0

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:

  • A set to 76.76.21.21

on www.mywebsite.fr:

  • CNAME set to cname.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?

ThomasG2201
  • 676
  • 6
  • 25
  • 1
    Sounds like a DNS cache or propagation issue. Check the website in your phone or another device. You can also use `dig A mywebsite.fr @1.1.1.1` to check the DNS record. – paulogdm Jul 21 '23 at 16:31
  • Well, I removed my ugly `.htaccess` file and now it seems to work... I don't know why but I tested another computer, and a friend tried the website on his phone, and it seems to be working just fine. I don't know why the problem got fixed on its own but I'm not going to complain ! Thanks :) – ThomasG2201 Jul 21 '23 at 20:42

1 Answers1

0

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.

ThomasG2201
  • 676
  • 6
  • 25