Report this

What is the reason for this report?

Temporary URL without Domain Name

Posted on September 5, 2023

Hello,

I moved my WordPres site from Digital Ocean. I need to access the Digital Ocean version of the site to transfer some additional data (Subscribers). I already changed the DNS.

So, is there a temporary URL I can use? Something like, stagingtiste.domain.com/mydomain/ Or something using the IP? http://xx.xx.xx/~username?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

To access your DigitalOcean version of the site after changing the DNS, you can use one of the following methods:

  1. Droplet IP Address: You can simply use the IP address of your Digital Ocean droplet to access the site. This would look something like:

    http://xx.xx.xx.xx/
    

    Replace xx.xx.xx.xx with the actual IP address of your Droplet.

  2. Using /etc/hosts on Your Laptop: Another approach is to modify the /etc/hosts file on your computer to temporarily point your domain back to the DigitalOcean Droplet’s IP address. This will trick your laptop into skipping the DNS lookup and load your domain directly from the specified IP in the hosts file. Here’s how you can do that:

    • Open a terminal on your computer.

    • Edit the /etc/hosts file. On most systems, you can use a command like:

      sudo nano /etc/hosts
      
    • Add a line at the bottom of the file with the format:

    DROPLET_IP_ADDRESS yourdomain.com www.yourdomain.com
    

    Replace DROPLET_IP_ADDRESS with your Digital Ocean droplet’s IP address and yourdomain.com with your actual domain.

    • Save and close the file.

    Now, when you visit your domain on your computer, it will load from the Digital Ocean droplet, but this change will only be local to your computer.

    On Windows, the hosts file is located in the C:\Windows\System32\drivers\etc folder.

Remember to remove or comment out the entry in the /etc/hosts file once you’re done to ensure you access the live site in the future.

Hope this helps!

Best,

Bobby

Heya,

If you’ve already updated the DNS for your domain to point to a new host and you need to access your WordPress site on DigitalOcean, you can use the DigitalOcean Droplet’s IP address directly. However, there are some considerations and steps to take:

  1. Direct IP Access:

    • In your browser, you can attempt to access your site using the IP address of your DigitalOcean Droplet, e.g., http://xx.xx.xx.xx. However, if you’re using virtual hosts (which is often the case if using server software like Apache or Nginx), this might not work directly since the server identifies the site based on the domain name.
  2. Hosts File: The most reliable method to access your old site without affecting anyone else is to modify the hosts file on your computer. This file allows you to override DNS for specific domains:

    • Windows: The file is located at C:\Windows\System32\drivers\etc\hosts.
    • Mac/Linux: The file is located at /etc/hosts.

    Open this file with administrative/root privileges in a text editor. Add a line at the end:

xx.xx.xx.xx    yourdomain.com www.yourdomain.com

Replace xx.xx.xx.xx with your DigitalOcean Droplet’s IP and yourdomain.com with your actual domain. Save the file and then try accessing yourdomain.com in your browser. It should load from your DigitalOcean server.

  1. Temporary Domain or Subdomain: If you have another domain or can create a subdomain, you can point it to your DigitalOcean server’s IP address. Then, on your server, you’ll need to update the virtual host settings to respond to this domain/subdomain.

Remember, if you’re using the hosts file method, don’t forget to revert the changes after you’re done to ensure you’re accessing the live site and not the old version on DigitalOcean.

Heya,

You can use the droplet IP address or modify your local hosts file as mentioned. A similar question was asked before in our community which you can check here:

https://www.digitalocean.com/community/questions/website-preview

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.