Report this

What is the reason for this report?

How to Adding my website files to a existing domain on digital ocean

Posted on January 27, 2025
Zo

By Zo

I’m switching my domain name to another website. How do I go about doing that? Or how can I add my website files to my website on digital ocean?



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.

Heya,

You’ll need to transfer your files over and you can use FTP for that. You can check this article right here:

https://docs.digitalocean.com/products/droplets/how-to/transfer-files/

Having said that, you’ll need to configure your Droplet as well. The best way I think if you don’t have technical knowledge is getting one of the marketplace droplets;

https://marketplace.digitalocean.com/apps/lemp

It will configure everything you need to host your website, just follow the instructions. Once you have it configured, you can use the first article on how to transfer the files over.

Hi there!

If you’re hosting your website on DigitalOcean and want to switch your domain or add your website files, here’s how to do it:

  1. Connect to your Droplet via SFTP (using tools like FileZilla) or SSH. Upload your website files to the appropriate web directory (e.g., /var/www/html for Nginx/Apache).

    If you want to do this over SSH, you can use Rsync as described here:

    https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories

    If you prefer not to use SSH, you can follow the steps here:

    https://docs.digitalocean.com/products/droplets/how-to/transfer-files/

  2. Update your domain DNS records:

    • Log in to your domain registrar.
    • Point the domain’s DNS records to your Droplet’s IP address. For example:
      • Add an A record pointing to your Droplet’s IPv4 address.
      • Optionally, add a CNAME record for www pointing to your domain.
  3. Configure Your Web Server:

    • Update your Nginx or Apache configuration to serve the new domain.
    • For example, set the server_name in your Nginx config or ServerName in Apache.

    You can follow the steps here:

    https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-20-04

    Or alternatively use the 1-Click installation from the Marketplace:

    https://marketplace.digitalocean.com/apps/lemp

Let me know if you have any questions.

- Bobby

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.