By peterpetrou
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!
You will need to buy a new SSL certificate since those are issued at the domain level. Depending on your needs, you might want to just use LetsEncrypt. I use it for all my sites and have never had a problem (and it’s free!).
As for the redirects, your web server can handle that at the domain level. For example, in nginx you can do this in the aaa.com server block:
server {
listen 80;
server_name aaa.com;
rewrite ^ https://bbb.com$request_uri? permanent;
}
If I remember correctly, this performs a redirect on the server side, rather than giving a 301 to the client. I’m not an Apache guy so I don’t know the syntax offhand, but I do know there’s a similar way to do the same thing.
Here’s a really good guide if you’re interested in the finer details: https://www.digitalocean.com/community/tutorials/how-to-create-temporary-and-permanent-redirects-with-nginx
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.