How to setup domain masking for external domains?

October 30, 2015 6.3k views
DNS Configuration Management

I have 2 domains registered under Google domains, call them & By the names you might have guessed we are going through a rebranding. Right now, droplets, certs, etc are all setup for While we wait on cert for we’d like to setup some sort of redirect/masking so if anyone goes to the cert there works but URL appears as What is the process to accomplish this?

Am I over complicating it with masking & is it as easy as changing the CNAME to then setting up Google domains to point to DO name servers?

1 Answer

You will need to handle the redirection at the http server level because that’s where you get to know which site the user wanted to browse and thus where you redirect them to.

You will also need to adjust DNS so users are sent to the new server.

  • It will all be same HTTP server (NGINX) so first point makes sense but not sure second applies?

    Flow of where user is taken when they type each URL: -> (uses current cert, shows as -> DigitalOcean IP

    Full disclosure I’m not an infrastructure guy at all. I can stand servers up and do the basics but this is a bit of an odd use case and trying to work through with limited knowledge. So the right reference article or whatever and I can figure it out.

Have another answer? Share your knowledge.

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