-1

I created a droplet server in DigitalOcean and set the DNS. Let's say domain is example.com. I deployed React project to domain first. When I enter the domain in chrome browser, it redirects example.com/login. Now I replaced it with PHP project. (they are different and independent projects) But domain shows me old website mostly, and rarely it shows me updated one. What is the problem, and how can I fix it? Thank you.

As I mentioned above, I replaced old project with new one, but domain on browser shows me old one mostly. Rarely it shows me new one updated. It's related to DNS cache? But it's already been three days.

  • Is something cached somewhere – RiggsFolly Jul 19 '23 at 13:38
  • However, this is not always the case. – Little Star Jul 19 '23 at 13:40
  • Are there `index.html` _and_ `index.php` files in your folder? Try renaming `index.html` if it exists – brombeer Jul 19 '23 at 13:49
  • index.php file is exist. I deleted all the old files, and uploaded new files. I need to rename index.php file? – Little Star Jul 19 '23 at 13:53
  • When I rename the directory of document root (domain), domain shows me 404 error. But it shows me old website in other browser. – Little Star Jul 19 '23 at 14:02
  • Sounds like [browser cache](https://stackoverflow.com/q/31262843/367456). Most modern browsers have a deveoper option to disable it with a checkbox in the network tools. Very handy as it is not always clear which component now caches what (and you mentioned DNS already, you can for most browsers as well make them to forget the DNS resolution, but it is more specific than developer/network tools). – hakre Jul 19 '23 at 14:37

1 Answers1

-1

Usually this should be a browser cache problem, try clearing your browser cache and try again, if it still persists, login to your server as root and update the domain document root and entry point to the new project directory and index.php