netlify site name: denver-paid-search.netlify.app
how my subdomains are setup:
I’m building a site with content coming from contentful. I have it building out 4 pages and have 4 subdomains setup in netlify. I’m trying to get each subdomain to redirect to its respective page that gatsby builds (i.e. /your-calling) but I want it to show like it’s at the subdirectory root… like the ‘your-calling’ page is the index page.
In the root of my project I have this for my netlify.toml
[[redirects]] from = "https://denver-paid-search.netlify.app/*" to = "https://experience.du.edu/:splat" status = 301 force = true # for all general pages [[redirects]] from = "https://experience.du.edu/" to = "https://experience.du.edu/experience" status = 301 force = true # for all business pages [[redirects]] from = "https://your-calling.du.edu" to = "https://your-calling.du.edu/your-calling" status = 200 force = true # engineering pages [[redirects]] from = "https://innovate.du.edu" to = "https://innovate.du.edu/innovate" status = 301 force = true # biology pages [[redirects]] from = "https://discover.du.edu" to = "https://discover.du.edu/discover" status = 301 force = true
Everything is redirecting correctly, meaning, when a visitor goes to https://your-calling.du.edu it shows the ‘your-calling’ page correctly, but the url ends up being https://your-calling.du.edu/your-calling (I want to the user to only see https://your-calling.du.edu). Now, it doesn’t matter if I use 200 or 301 (see how I have your-calling as 200 and the others as 301… that is to test), it always redirects to show the page name.
What am I doing wrong? How can I get it so that whichever of these 4 urls get hit, that it stays at the subdomain and still shows the correct page without showing the page name in the url?