I have a site with an external domain setup on Netlify. My domain is registered with Namecheap, and I have this domain working under taskovate.com and www.taskovate.com pointing to my Netlify site at taskovate.netlify.app. This works well, and I have even setup up working SendGrid (mail service) DNS records. But, I cannot get custom subdomains to work.
My specific use case involves me eventually creating dynamic subdomains that are created when a user signs up. As a test, I wanted to create a CNAME DNS record that takes login.taskovate.com and points it to my Netlify site at taskovate.netlify.app/customers/auth/login. This is a working route on my SPA website.
Unfortunately each time I do this (and even when pointing the login subdomain to the main site at “taskovate.netlify.app.”) I always get an error such as Not Found - Request ID: #####. I have been stuck like this for weeks. I did wait more than 24 hours previous tries with the same results.
The latest error:
Not Found - Request ID: 01G0C79PQ01Y2T200YTEBEPWM4
I also tried using ALIAS records to no avail.
Please can someone assist, any help is appreciated!
I am also seeing this with my latest attempt. I don’t think this is because it needs to propagate as I have seen this previously waiting over 24 hours.
This could be done by adding the custom domain to the site settings (under Site Name > Settings > Domain management > Custom domains). Then you would make a redirect rule which sends that domain to that path like so:
This will force any URL for the domain login.taskovate.com to be redirected to https://taskovate.com/auth/login with a 301 status.
Note, you must delete the CNAME record before adding the custom domain to the site for this to work. (It also looks like you have already delete it so you can just add it to the site now.)
If this doesn’t work or if there are other questions, please let us know.
Hi @coelmay,
I didn’t realize that at the time so thank you.
@luke I don’t think that would fully meet my use case requirements if it redirects me since it would be a redirect. although I could make it work possibly. However, because my ultimate use case is a little different I did some digging and I found that wildcard subdomains might be what I’m looking for. I actually upgraded to Pro last night and tried creating a CNAME record as follows, but it did not work.
I apologize, I actually will need to put some thought into this. I’d like to cancel my request for help regarding wildcard domains. It may just be easier for me to serve user sites at a subdomain like app.taskovate.com/companyname.
I will most likely post another thread if I run into any issues.
Thank you
Hi, @elijahmontenegro. The workflow you first described is possible if your client side javascript parses the subdomain to know what site to show. There is no way to redirect automatically using a subdomain.