DNS - Cloudflare vs Netlify

@makilahy I have to apologize! And edit my response above! I totally forgot a piece of the puzzle here and responded incorrectly regarding the 301 redirects.

Yes, domain aliases are 301 redirects.

Domain aliases can be setup as 301 redirects by using a _redirects file. I forgot that I have those _redirects setup on my Site for all of those aliases I showed above. If you don’t set up the _redirects,

Then this is the correct behavior — they really are “aliases”. I’m so sorry for forgetting that bit!

Now, that said, Netlify will automatically add a Link: <https://YOUR_PRIMARY_DOMAIN/>; rel="canonical" header into the response of any request that hits a domain alias. This means it’s not too big a deal from an SEO standpoint that your site is served on multiple domains (the Link: tells SEO crawlers to use your primary domain) but I can understand that you’d want to push all traffic to your main domain regardless (I do the same).

I’d start with a good read of the _redirects documentation:

Then once you have the idea down, you can implement redirects for each of your aliases that look like this: (these are mine):

https://jsul.ly/*                https://jonsully.net/:splat   302!
https://aka.fm/*                 https://jonsully.net/:splat   302!
https://jon.fm/*                 https://jonsully.net/:splat   302!
https://jonsully.netlify.app/*   https://jonsully.net/:splat   302!

Hope that gives you somewhere to start! And again, my apologies for the mishap on the ‘automatic’ 301s!


Jon

1 Like