Question

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

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?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
January 28, 2025

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.

Bobby Iliev
Site Moderator
Site Moderator badge
January 28, 2025

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

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.