Redirect to primary domain fail


I just add my domain to my netlify repository, but previously all site was under with all languages paths. When i type aboutgreen on google it propose I also have and, when a user go to it should redirect to and should redirect to (temporarily).

I want to do the same for all domain so, i made a visible redirect in ovh from to because all languages where under .lu first, and to but it doesn’t work… now on it says "Fastly error: unknown domain: Please check that this domain has been added to a service.

Details: cache-ams21078-AMS"

I’m very confused how to do that, i don’t know if i have to link all my others domains in my repository as domain alias or not… i also tried to make redirect in gatsby with “createRedirect” but it doesn’t seems to work too…

Thanks you very much

Hi, @JohannBoumans. Our support team can answer questions about Netlify and our services but we cannot provide technical support for other services. I mention this because the domain isn’t hosted at Netlify currently:

Name server records (type = NS):		3599	IN	NS		3599	IN	NS

Records for the apex domain (type = A):

Records for www subdomain:	            3599	IN	CNAME       29	IN	CNAME    29    IN   	A

I can share information about how to do this at Netlify though. The steps would be:

  1. Create the required DNS records (as found in the external DNS instructions) for like you have already done for
  2. Add the custom domain to the site as a domain alias (which I see has already be done).
  3. Add redirect rules to the site and trigger a new deploy with those changes to make those redirects active.

Personally, I prefer the syntax of the _redirects file. In _redirects format the required domain-level redirects might look like this:*  301!* 301!* 301!* 301!

These redirects would send any HTTP requests for any URLs at or to the /fr-lu path at the domain.

I also have one final comment. I see you have made an A record for the apex domain and made the apex domain the primary domain for the site. When using the A record for the apex, we recommend not making the apex the primary domain. There is more about why in this blog post, quoting:

There’s one small but unavoidable downside here: manually setting an A record on your apex domain that points to our load balancer doesn’t let us insert any advanced traffic direction. We have no way of routing users who go to (without the www. ) to the closest or most performant CDN node. Luckily, any suboptimal performance will only affect site visitors the first time they go to the bare domain; after that, their browser cache will have the redirect to , where they’ll benefit from our globally distributed infrastructure.

If there are other questions about this, please let us know.

1 Like

i didn’t knew was pointing again to gatsby cloud… it’s a company that takes care of the dns so it’s hard for me to make my own test to learn how to do!
So i guess i have to add .be .fr as domain aliases, then make a redirect file, like this if i want the .lu/fr-lu to .eu/fr-lu and .lu/fr-be tp .eu/fr-be to keep SEO => 301! 301! 301! 301! 301! 301! 301! 301!

But with these redirect i guess i also need to make a visible redirect in the domain hosting too?

i tell the guy to do that for to redirect to and to because al languages were before under .lu and now it’s everything under .eu so i tell him to redirect to .eu instead of .eu/fr-lu.

But i’m not very sure of what i’m doing because something with these redirects url become I don’t know if i just have to redirect .be to .eu and .lu to .eu.

I changed my to my primary domain as i saw in the blog post you shared.

Thank you so much for your help!

Hey there!

I can see a lot of different redirect rules, based on the different domains. I don’t see any redirects based on particular paths.

I don’t know if i just have to redirect .be to .eu and .lu to .eu.

If you simply want to redirect different domain TLDs (.be, .eu, .lu) then you can use rules like this:* 301!* 301!* 301!* 301!

And then the same for the other TLDs!

If you require something different, please do let me know and we will be happy to help.