Redirect subdomain to internal page on Netlify site

Hello there! I’m new to Netlify, and having some trouble getting some redirects to work right. I’m probably missing something because DNS stuff is a pain.

Site name: davidakennedy
Redirects in netlify.toml file: https://github.com/davidakennedy/davidakennedy.com/blob/main/netlify.toml
I’m using Netlify DNS.

I’m trying to redirect some subdomains that no longer exist to an internal page on the Netlify hosted site. So I want:

wpthemes.davidakennedy.com, accessiblezen.davidakennedy.com, www.wpthemes.davidakennedy.com and www.accessiblezen.davidakennedy.com to all go to https://davidakennedy.com/projects/accessible-zen/

I’ve set up CNAMES for those subdomains and put the redirects in my .toml file, but it’s not working correctly. This could be because I just flipped the DNS today. I know that takes some time, but I’m unsure if my setup is right. I read few a number of other support threads, but none of them seemed to fit my case.

Thanks for the help!

I think I have this figured out, but still would love to know if it’s the best way.

I found a page in the docs that said for other domains that aren’t the primary domain which need to be redirected have to be added as a domain alias or custom domain. So added them as domain aliases and removed the CNAME records in my DNS for them.That seems to have done it.

Heya @davidakennedy and welcome to our community!

I see solid redirects that would match my advice in the file you link.

You shouldn’t need CNAMEs once you apply names to your site after configuring DNS. All the “NETLIFY” type records here are ones we made for you when you added the additional domain aliases to your site:

https://app.netlify.com/teams/davidakennedy/dns/davidakennedy.com

So - everything working as intended now? Happy to help further if not!

Hi @fool , thanks for the help!

The original two redirects I posted about are working great. I do have a related question about my DNS.

I put up another Netlify site (Netlify subdomain: testkitchen-davidakennedy) recently and changed the DNS about 24 hours ago as I write this. It’s a subdomain of the site that started this thread. Everything appears right in the DNS panel. However, when I run curl -s -v http://testkitchen.davidakennedy.com 2>&1 | grep Server , nothing returns. So seems like it’s taking a long time to update (I know it can take up to 48 hours) or something is wrong. Does everything look right?

Much appreciate the product and help so far!

Hey @davidakennedy,
Your setup is correct- you ran into a bug on our end! Sorry about that, but I think your site is working now. Please let us know if that’s not the case.

Good to go! Thanks, Jen!