Why does my website look different when accessed via local IP versus domain?

0
20
Asked By TechieNinja42 On

Hey everyone! I'm new to web development and have run into a bit of a head-scratcher. I'm hosting my website using NGINX and a Cloudflare Tunnel on my Raspberry Pi. Everything was going smoothly until I noticed that when I access the site through my local IP, it looks fine. However, when I open it via the domain, it doesn't work as expected. It's not just a CSS issue; the website just isn't displaying correctly. I've shared screenshots of how it looks on both. Can anyone help me figure out what might be happening?

5 Answers

Answered By DevGuru77 On

Could it be related to JavaScript? An extension might be messing with the website as well. Giving a different browser a shot could rule out that possibility.

Answered By CuriousCoder99 On

Have you checked the developer tools to see if all your assets are loading correctly? This might hint at a CSS file that's being blocked instead of not applying at all. Sometimes, requests can go through, but you might be getting an HTML error page back due to how NGINX is set up.

Answered By WebWanderer88 On

It sounds like you should inspect your elements and compare them between the local and domain versions. You might also want to check the source code from your deployed page to ensure everything's in order.

Answered By PathFinder56 On

This looks a lot like a path issue with either your JS or CSS files. Double-check the file paths to make sure they're correct and that everything is where it should be.

Answered By BrowserBuff22 On

Have you tried loading both versions in a different browser or in safe mode? Sometimes, caching issues can make the CSS fail to load properly. Switching it up could help!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.