until today I was using a simple PHP website hosted on a server I bought to 1&1 IONOS a while ago. I also bought my domain there.
However, I rebuilt my website using SvelteKit, and I want to host it on Vercel. I followed the instructions to reconfigure the DNS :
on mywebsite.fr:
Aset to76.76.21.21
on www.mywebsite.fr:
CNAMEset tocname.vercel-dns.com
(No redirections).
I also kept the original one from Vercel: mywebsite.vercel.app.
Vercel is saying that the configurations are correctly set and that everything should work perfectly fine. However, here I am, with a problem. The top-level domain is not working (mywebsite.fr). It still uses the old index.php from the FTP server. I tried deleting the index.php file but now it shows a 403 Forbidden error (apparently a visitor doesn't have the "authorisation" to access a file).
The only solution that I found is using a .htaccess at the root of my FTP server:
Redirect 307 / https://www.mywebsite.fr
For some reason, www.mywebsite.fr works perfectly fine (it shows the SvelteKit version of my website), and for an unknown reason, it automatically redirects to mywebsite.fr (I have no idea why, and such redirection doesn't come from Vercel). Apparently, I, or IONOS itself, configured a permanent redirection. Once a visitor accessed www.mywebsite.fr the top-level domain is working fine. I don't remember setting such redirection, it's been countless years.
To summarise, how do I transfer a domain, that I was previously using via an FTP server, to Vercel?
Well, I did all those things in the morning, and the problems happened this morning, but at the evening it was working fine. At least, I think it's working. Maybe it was some sort of propagation issue and hidden DNS cache.