I just add my domain aboutgreen.eu to my netlify repository, but previously all site was under aboutgreen.lu with all languages paths. When i type aboutgreen on google it propose aboutgreen.lu. I also have aboutgreen.be and aboutgreen.fr, when a user go to aboutgreen.be it should redirect to aboutgreen.eu/fr-be and aboutgreen.fr should redirect to aboutgreen.eu/fr-lu (temporarily).
I want to do the same for all domain so, i made a visible redirect in ovh from aboutgreen.lu to aboutgreen.eu because all languages where under .lu first, and aboutgreen.be to aboutgreen.eu/fr-be but it doesn’t work… now on aboutgreen.lu it says "Fastly error: unknown domain: www.aboutgreen.lu. 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…
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 aboutgreen.lu isn’t hosted at Netlify currently:
Name server records (type = NS):
aboutgreen.lu. 3599 IN NS dns200.anycast.me.
aboutgreen.lu. 3599 IN NS ns200.anycast.me.
Records for the apex domain (type = A):
<missing>
Records for www subdomain:
www.aboutgreen.lu. 3599 IN CNAME aboutgreenmain.gatsbyjs.io.
aboutgreenmain.gatsbyjs.io. 29 IN CNAME us-eu.gatsbyjs.map.fastly.net.
us-eu.gatsbyjs.map.fastly.net. 29 IN A 151.101.54.78
I can share information about how to do this at Netlify though. The steps would be:
Create the required DNS records (as found in the external DNS instructions) for aboutgreen.lu like you have already done for aboutgreen.eu.
Add the custom domain to the site as a domain alias (which I see has already be done).
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:
These redirects would send any HTTP requests for any URLs at aboutgreen.lu or www.aboutgreen.lu to the /fr-lu path at the aboutgreen.eu 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 example.com (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 www.example.com , where they’ll benefit from our globally distributed infrastructure.
If there are other questions about this, please let us know.
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 aboutgreen.be to redirect to aboutgreen.eu/fr-be and
aboutgreen.lu to aboutgreen.eu 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 aboutgreen.eu/fr-lu/fr-be. I don’t know if i just have to redirect .be to .eu and .lu to .eu.
I changed my www.aboutgreen.eu to my primary domain as i saw in the blog post you shared.