On this pageHow masking works
Domain masking, also sold as URL masking, stealth forwarding or forwarding with masking, shows the content of one web address while the browser keeps displaying another. Registrars offer it as a checkbox next to ordinary domain forwarding, and it looks like a cheap way to put a shop or a booking page under your own name. In practice it breaks in ways that are hard to debug. Each reason people reach for it has a better tool, and the tools are not much harder to set up.
How masking works
With masking on, the registrar's servers answer for your domain with a tiny HTML page whose only content is a frame filling the whole window. The frame loads the destination. Fetch a masked domain and you see something like this:
<html>
<head><title>Example Brand</title></head>
<frameset rows="100%">
<frame src="https://store.example.net/shops/4821">
</frameset>
</html>
The address bar keeps showing your domain because the top-level page never changes. Every click happens inside the frame. To check whether a domain is masked, look for a frame in what it returns:
curl -s https://example.com/ | grep -i -E '<frameset|<iframe'
Plain forwarding works differently: the server answers with a redirect status such as 301 and a Location header, and the browser moves to the destination and shows its real address.
Masking, redirects and proxies compared
| Masking with a frame | Redirect | Reverse proxy | |
|---|---|---|---|
| Address bar | Your domain, never changes | The destination's address | Your domain, with real paths |
| Deep links and bookmarks | Always land on the start page | Work | Work |
| HTTPS | The masking host needs a certificate for your domain too | Each host uses its own | Your proxy's certificate |
| Search engines | See a frame and almost no content | Follow it; a permanent redirect hands signals to the target | Index the content at your address |
| Logins, carts, cookies | Often break inside the frame | Work | Work, with cookie settings checked |
| Setup | A checkbox | One rule | A server you run |
Why masked sites break
- The destination refuses to be framed. Sites protect themselves against clickjacking with the
X-Frame-Optionsheader or theframe-ancestorsdirective of a Content Security Policy. Browsers then show an empty or refused frame. Check a destination withcurl -sI https://store.example.net | grep -i -E 'x-frame-options|content-security-policy'. - Cookies stop working. Inside a frame from another site, the destination's cookies are third-party cookies. Safari and Firefox restrict third-party cookies by default, and Chromium-based browsers treat cookies without a
SameSiteattribute asLax, which keeps them out of cross-site frames. Logins and carts fail in ways that differ from browser to browser. - HTTPS gets awkward. The masking page needs its own certificate for your domain. If the registrar serves the frame over plain HTTP, browsers mark the page as not secure, and a secure page cannot frame an insecure one.
- Links lose their meaning. A visitor who copies the address always shares the start page. The back button and browser history behave oddly.
- Search gains nothing. Search engines generally index the framed page at its own address. Your domain offers a frame and a title, which ranks for nothing.
- It looks like phishing. Full-window frames of another domain are a classic phishing pattern, one more reason many sites forbid framing outright.
What people want, and the right tool
| You want | Use |
|---|---|
| To move a site to a new domain | A permanent redirect that keeps the path |
| Several domains for one site: typos, old brands, country domains | Redirect them all to one main domain |
| Your brand on a hosted shop, booking page or help center | The service's custom domain feature, usually a CNAME record plus a certificate it issues |
| Content from another server under your domain | A reverse proxy |
| To hide where a site is hosted | A reverse proxy or a CDN; masking hides nothing, the frame source is in the page |
Redirect properly
A redirect server needs a certificate for every domain it answers, then one rule. In nginx:
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
server_name old-brand.example www.old-brand.example;
ssl_certificate /etc/letsencrypt/live/old-brand.example/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/old-brand.example/privkey.pem;
return 301 https://www.example.com$request_uri;
}
Caddy obtains the certificates itself, so the same job is three lines:
old-brand.example, www.old-brand.example {
redir https://www.example.com{uri} permanent
}
301 and 308 are permanent; 302 and 307 are temporary, and the 307 and 308 pair also keep the request method, which matters for forms and APIs. Browsers cache permanent redirects hard, so test with curl before you publish one:
curl -sI https://old-brand.example/pricing | grep -i -E '^(http|location)'
You should see a 301 status and location: https://www.example.com/pricing.
Serve another site under your domain
When the content must stay elsewhere but the address must be yours, a reverse proxy fetches each page and serves it under your name. Only do this for sites you run or have permission to proxy. In nginx:
server {
listen 443 ssl;
server_name shop.example.com;
ssl_certificate /etc/letsencrypt/live/shop.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/shop.example.com/privkey.pem;
location / {
proxy_pass https://store.example.net;
proxy_set_header Host store.example.net;
proxy_ssl_server_name on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}
proxy_ssl_server_name on sends the upstream's name during the TLS handshake, which most hosted platforms require. Expect some cleanup: the upstream may build absolute links and redirects with its own hostname, and set cookies for its own domain. Set the application's public URL to your domain where it allows it, and use nginx's proxy_redirect and proxy_cookie_domain for the rest. Redirects and a light proxy need very little memory, so a small CloudSat Cloud VPS running nginx or the Caddy one-click app can carry them.
Move off masking without losing visitors
Switching a masked domain to one of the setups above takes an afternoon. Do it in this order:
- Lower the TTL of the domain's DNS records a day ahead, so the change spreads quickly.
- Prepare the destination. Configure the redirect or proxy on your server, or add the domain in the hosted service's custom domain settings, before anything points there.
- Switch DNS. Turn off forwarding at the registrar, then create the
AandAAAArecords for your server, or theCNAMErecord the service asks for. - Get certificates. Caddy fetches them on the first request; with nginx, run your ACME client, such as certbot, once the records resolve.
- Test old addresses. Request the start page and a few deep links with curl and confirm each lands where it should.
- Update the links you control: email signatures, ads, social profiles and printed QR codes. If the site itself changed domains, tell search engines through their webmaster tools, for example the change of address feature in Google Search Console.
Keep others from framing your site
The same headers that break masking protect your own site from being framed by someone else's domain. In nginx, inside each server block:
add_header Content-Security-Policy "frame-ancestors 'self'" always;
add_header X-Frame-Options SAMEORIGIN always;
Modern browsers follow frame-ancestors; X-Frame-Options covers older ones.
FAQ
Does domain masking hurt SEO?
It rarely helps and can hurt. The masked domain shows search engines a frame with no content of its own, while the destination ranks at its own address. If you want a domain to carry search value, serve the content there or redirect it permanently.
Can a masked domain use HTTPS?
Only if the registrar issues a certificate for your domain on the masking host. Even then the destination must be HTTPS and must allow framing, which many sites forbid.
Is masking the same as cloaking?
No. Cloaking means showing search engines different content than visitors see, which search engine spam policies prohibit. Masking hides the address, not the content, but it brings you no ranking benefit either.
Can I keep my domain in the address bar without masking?
Yes. Use the hosted service's custom domain feature if it has one, or run a reverse proxy in front of the content as shown above.
Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.




