Hi, I would like to create subdomains that forward to a different URL. My domain provider provided this but since moving to NetlifyDNS I am not sure how to go about it.
I want to create a domain like v1.blog.com and redirect it to some place like website.com/where-things-used-to-be/.
Because I am forwarding to a specified path, I don’t think a CNAME record will solve the problem for me. So far, the only option I can think of is to create more NETLIFY records with apps to enable redirecting their index to where I want.
Is there a better way to go about this?
I had read this post about forwarding subdomains to path but the solution there doesn’t work in my case where I simply want a record that points to a path on a different domain
The post you linked to it the only option. You would need to add the subdomain to a site (main site or another Netlify site) as a custom domain/custom domain alias a configure redirects. If required, you can have more than one subdomain set up on a single Netlify site.
I know of no other way to accomplish your desired setup.
You create a new Netlify site, and add discord.maineomain.com as a custom domain. You can then deploy (using drag and drop) a directory with a _redirects file that contains
/* https://discord.gg/ahshdb
So that any path on that subdomain is redirected to the Discord URL.
Ok but I want to keep my main site under maineomain.com/ and also don’t want to set up another branch only for this rederict. How do I handle this exactly?
Sry for thebquestion but iam new on netlify. On namecheap tat all was very easy
Correct @VidarDev, you deploy a completely new site and configure discord.maindomain.com as the custom domain. You do not change anything to do with maindomain.com or the site it is attached to.
There is no need for a branch. You can deploy this site using Drag and Drop.
ok why a directory that have only one _redirects file need more then 20 mins to deploy? no fails no deploy only:
Deploy log
3:30:03 PM: Creating deploy upload records
ok all done no fails:
3:49:28 PM: Creating deploy upload records
3:49:30 PM: Starting post processing
3:49:30 PM: Post processing - HTML
3:49:30 PM: Post processing - header rules
3:49:30 PM: Post processing - redirect rules
3:49:30 PM: Post processing done
3:49:33 PM: Site is live
This is not working for me. I tried using a _redirects file a _redirects.txt file and I even tried adding a .netlify.toml file and adding the redirect in there the way I normally would but when I view the site all it does is show a white page and never redirects anywhere.
Hi @raidchamps welcome back to the forums! Thanks so much for reaching out. Can you share your site name?
I strongly suggest you give it a thorough read through and see if this fixes your problem: