We have a customer who has split into 2 companies and so I had to create a new Netlify account. The domain is still in the old Netlify account and is a subdomain https://old.old-domain.com. Now I wanted to forward this subdomain to my new Netlify account with the following domain https://www.new-domain.com.
The website was made with Gatsby.js, I have now tried various approaches to store the redirects (gatsby-node.js, _redirects, netlify.toml…) but none of them worked.
It should also be noted that a domain redirect is also entered in the domain hosting, but this only works for the homepage. The redirects I created for the paths do not work.
Now I don’t know what the problem could be, but I would be happy to receive help. If you need any further information, please let me know.
I was wrong, there was no forwarding at the registrar.
I have now fixed it. I had to delete the entire site from the previous Netlify account and add it back to the account. Then I linked my redirect repo from Github to it, where I just have an html file and a _redirect file, and now there is no cached page and the redirects work fine.
So for anyone in the future, if your site is cached the old content is displayed, you need to delete the page via the danger zone and add it again.