How to configure Sub-folders with Netlify on Feather

Netlify configuration setup to host your blog as a /blog sub-folder

Published on:

How to configure Sub-folders with Netlify on Feather
Do not index
Do not index
Let’s say your main domain is www.mydomain.com and feather blog url is my-domain.feather.blog and you want to host on /blog sub-folder.
To configure that, add this to your netlify.toml. Make sure to change my-domain.feather.blog by your Feather blog url
[[redirects]]
  from = "/blog"
  to = "https://my-domain.feather.blog/blog"
  status = 200
  force = true
  headers = {X-Forwarded-Host = "www.mydomain.com"}

[[redirects]]
  from = "/blog/*"
  to = "https://my-domain.feather.blog/blog/:splat"
  status = 200
  force = true
  headers = {X-Forwarded-Host = "www.mydomain.com"}

[[redirects]]
  from = "/_feather"
  to = "https://my-domain.feather.blog/_feather"
  status = 200
  force = true
  headers = {X-Forwarded-Host = "www.mydomain.com"}

[[redirects]]
  from = "/_feather/*"
  to = "https://my-domain.feather.blog/_feather/:splat"
  status = 200
  force = true
  headers = {X-Forwarded-Host = "www.mydomain.com"}
By making the following change, we’re basically telling that: ”Hey Netlify, whenever a person goes to www.mydomain.com/blog, don’t do anything. Let feather handle it.”

Once this is done, go to Feather. Navigate to Settings > Features and switch on “Enable Subdirectory” feature and after that go to Settings > Sub-folder management and enter the following values,
notion image
💡
Make sure to replace www.mydomain.com with the domain you are using and blog with whatever sub-route you plan to use.
Important Note: Under the Domains section make sure that you are using Subdomain settings. If you have added a custom domain there, please remove it. Sub-folders does not require the Custom Domain configurations and if you have it, then the sub-folder will not work.
 
Once you do these, your sub-folder should be live. You should be able to access your feather site on www.mydomain.com/blog. If it’s not reach out to us at support@feather.so.