1

For some reason, Google Domains does not have a mask feature. Is it possible to do this using custom resource records or synthetic records?

  • 1
    Please find the answer here. It has already been asked on StackOverflow, but since it's not on webmasters.stackechange.com, I was not able to mark this as duplicate. – Anuvesh Aug 26 at 18:16
  • "For some reason" - Although no other domain registrar offers this feature either AFAIK - at least not one that you should use in production anyway. To truly mask a domain in a redirect you need to configure a reverse proxy or point the domain at another host and configure that server to accept requests to this domain (but that's not really a "redirect"). (?) – DocRoot Aug 28 at 20:59
  • Then again, maybe I've misinterpreted your question... what exactly are you trying to do? Request a domain you have registered with Google Domains and display the site at some arbitrary site example.com? Do you have control of example.com? – DocRoot Aug 28 at 21:08
  • @DocRoot GoDaddy offers forwarding with masking. Not that I ever recommend using masking or any of Godaddy's broken redirects. – Stephen Ostermiller Nov 12 at 21:40
1

Masking is horrible and nobody should ever use it.

  • It doesn't work for SEO. Search engines see right through it and index the hidden URL rather than the domain with masking.
  • Users can choose to use either the masked URL, or the real URL. There is nothing that forces users to use the masked URL.
  • It isn't good user experience if users try to use the masked URL. As they click around your site, the URL never changes so they can't bookmark deep pages.

This is because URL masking is implemented as an HTML frameset. The mask is a simple HTML page that uses frames to contain another website as 100% of its content. If you want to implement masking yourself, simply point the domain at a server and serve up a single HTML page with the contents like the following, substituting in something other than example.com:

<html><head>
<title>example.com </title>
</head><frameset><frameset rows>
<frame src="https://example.com/">
</frameset></html>

You also seem to have another misconception about redirects and masking. You talk about implementing them with "records", by which I assume you mean "DNS records". DNS is not capable of implementing any HTTP redirects or framing. All DNS can do is point the domain at an IP address. That IP address must have a running HTTP server that issues the redirect requests.

I find that most of the time when somebody says they want a "masked redirect", what they actually want is their content hosted at that domain name. To do so, you don't redirect to the domain name at all. The steps are usually:

  1. Add the domain to your web hosting account. This will configure the server with virtual hosts so that requests for that domain name are mapped to a directory under your control.
  2. Use DNS A records to point your domain and the www subdomain to the IP address of your web host's server.

So the only time that you should consider using masking is when your web host doesn't allow you to add domains to your web hosting account. In that case though, I would recommend getting a better web host rather than try to use masking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.