How do i change to a completely new domain?

February 26, 2019 295 views
Networking Let's Encrypt Ubuntu 18.04

Hello,

I'm having quite a difficult time changing the domain to a completely different one. Currently the domain with SSL is the aaa.com but im looking to change over to bbb.com and also install SSL.

I just want it to point to bbb.com, i don't care about the old domain redirecting.

I can't seem to find any tutorials for this.

Thanks

2 Answers

Hey friend,

There are some specifics on your setup that I do not know, and for that reason I'm going to focus on the high level steps.

Step 1: Change your virtual host (Apache) / server block (Nginx) to adjust references from aaa.com to bbb.com.

Step 2: Run certbot to get a certificate for bbb.com, you'll be prompted for the values.

Keep in mind that your web application may create another step for you. Applications like Wordpress, for example, store the URL they are intended to run at in their configurations, which causes them to redirect all traffic to the domain set.

Jarland

  • So i finally got the certbot to work properly on bbb.com but now none of my images are loading. I got the following response from the server when running the encryption

    Congratulations! You have successfully enabled https://bbb.com and
    https://www.bbb.com
    
    You should test your configuration at:
    https://www.ssllabs.com/ssltest/analyze.html?d=bbb.com
    https://www.ssllabs.com/ssltest/analyze.html?d=www.bbb.com
    -------------------------------------------------------------------------------
    
    IMPORTANT NOTES:
     - Congratulations! Your certificate and chain have been saved at:
       /etc/letsencrypt/live/bbb.com/fullchain.pem
       Your key file has been saved at:
       /etc/letsencrypt/live/bbb.com/privkey.pem
       Your cert will expire on 2019-05-27. To obtain a new or tweaked
       version of this certificate in the future, simply run certbot again
       with the "certonly" option. To non-interactively renew *all* of
       your certificates, run "certbot renew"
     - Some rewrite rules copied from
       /etc/apache2/sites-enabled/000-default.conf were disabled in the
       vhost for your HTTPS site located at
       /etc/apache2/sites-available/000-default-le-ssl.conf because they
       have the potential to create redirection loops.
     - If you like Certbot, please consider supporting our work by:
    
       Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
       Donating to EFF:                    https://eff.org/donate-le
    
    

    Now none of my images are loading on the site.

Hey there,

First you have to create the nwe domain on your domain provider bbb.com and point it to your server, then you have to change your apache/nginx site configuration,changing the server name from aaa.com to bbb.com. Then you will be able to create your SSL certificate through a Certificate Authority or creating yourself the certificate usign tools like certbot.

Have another answer? Share your knowledge.