Search code examples
urlnginxdnsloadingfavicon

Different URLS to same website show different content


I cannot see what might cause this problem. I made a website which, as all websites do, looks different on a phone. Here is the link: pizzariaalcapone.ddns.net

I bought a domain and static IP address in order do have a proper URL: www.pizzaalcapone.com

However, if you access pizzaalcapone.com on your phone (or with Chrome dev tools plus smaller window) it does not show the mobile version, but a very cramped desktop version.

If I access it directly with my IP, http://178.115.250.120, It also shows correctly. Furthermore, the favicon is not loaded it I use the pizzaalcapone.com to access it. Error: "http://www.pizzaalcapone.com/favicon.ico 404 (Not Found)". But if you call http://178.115.250.120/favicon.ico, it shows the icon.

I have concluded that it is a problem with the DNS OR with nginx, but I think that's unlikely. I have never done anything with DNS before, I just cannot figure out what causes that.

What could be causing this strange behaviour?


Solution

  • so i figured out what the problem was: There are DNS records. The type A record was going to 184.168.131.241 and i was not able to change it. This was because i had set up a redirect which pointed to the address of my server. This was the wrong approach. The right approach was to delete the redirect. After that, I was able to change the "A" record to the desired IP, now it works! Thank you Tiago and Alexy for giving me the hint, that's what made me realize what the problem was.