iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
WordPress has no single “mask domain” switch. The right method depends on what you mean by masking: sending visitors from one domain to another, making a second domain the real address of the same WordPress site, or displaying an external site inside a WordPress page while the outer permalink remains visible.
Choose the outcome first. Use a 301 or 307 redirect when traffic should move to another URL, connect the domain through DNS when it should become the site’s canonical address, and use an iframe or content-masking tool only when you are authorized to frame or redistribute the external material. These choices differ in address-bar behavior, deep-link handling, search indexing, SSL, navigation, and maintenance.
Recommended Free Tools
What “domain masking” means in WordPress
Domain masking is an informal term, not a WordPress feature name. It commonly describes three different setups:
- Redirecting: the browser is sent from one URL to another. The destination URL eventually appears in the address bar.
- Connecting a second domain: DNS and hosting are configured so the second domain serves the WordPress installation as the real site address.
- Framing external content: an iframe displays another site inside a WordPress page, so the outer WordPress permalink can remain visible while the content is loaded elsewhere.
Those outcomes are not interchangeable. A redirect communicates that the destination is the URL visitors should use. A DNS connection makes the alternate domain part of the site’s infrastructure. An iframe changes presentation only; it does not turn the external site into a native WordPress installation.
#1 Best Overall
Choose the method that matches your goal
| Goal | Use | What visitors see | Main caution |
|---|---|---|---|
| Move a domain permanently | 301 redirect or a connected domain | The destination domain is used as the public address | Update canonical URLs, links, certificates, and deep paths |
| Forward traffic temporarily | 307 redirect | The destination URL appears in the address bar | Do not use it as a permanent migration signal |
| Make a second domain the actual WordPress address | DNS connection through the registrar and host | The second domain stays in the address bar as visitors browse | Back up DNS records, especially mail records, before editing |
| Show an authorized external page inside WordPress | Iframe or content-masking plugin | The outer WordPress permalink can remain visible | Framing, scripts, cookies, navigation, and licensing may fail |
Method 1: Forward a domain in WordPress.com
WordPress.com defines forwarding as a web-server function that automatically redirects visitors from one domain URL to another. Use this when a custom domain or subdomain should send visitors to a different website or page, rather than when you need the source domain to remain the canonical address.
Set up the forwarding rule
- Sign in to WordPress.com and open the Hosting Dashboard.
- Open Domains and select the domain or subdomain you want to forward.
- Choose Domain forwarding.
- Enter the complete target URL and save the rule.
- If the destination has matching paths, enable the optional path forwarding setting so requests such as
/aboutcan be mapped rather than sending every request only to the homepage.
Advanced settings offer a Permanent redirect (301) and a Temporary redirect (307). Select 301 only when the move is intended to be permanent; browsers and intermediaries may cache it for longer. Select 307 when the forwarding is temporary and you expect to restore or change the original address.
WordPress.com notes that a forwarding change can take a few hours to propagate across servers and internet service providers. During that period, different networks may show different results. Test from more than one connection before assuming the rule failed.
What forwarding does not do
Forwarding is not a masked frame. The browser follows the destination, so the target URL becomes visible. If the goal is to keep the original domain in the address bar while showing another site, use an iframe only where framing is permitted, or connect the domain to the WordPress host instead.
Method 2: Use WordPress.com site redirect for a former .wordpress.com address
WordPress.com’s site redirect is designed for leaving a .wordpress.com site address and sending traffic, including permalinks, to another site. It is different from domain forwarding: WordPress.com recommends domain forwarding for a custom domain or subdomain.
Rank #2
When site redirect fits
- You are retiring a site at
example.wordpress.com. - You want old posts and page links to lead visitors to the replacement site.
- The old address should no longer function as the public site address.
Site redirects are unavailable on sites with plugins installed or with hosting features activated. If those conditions apply, use the migration or redirect controls provided by your host, or configure a redirect on the server.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Method 3: Connect the second domain through DNS
Choose a DNS connection when the second domain should be the actual WordPress site address rather than a forwarding alias. The domain remains registered with your registrar, while its DNS records point to the WordPress host. On WordPress.com, the A-record guidance says DNS remains controlled at the registrar and that the old .wordpress.com address redirects to the newly connected domain.
Prepare before changing DNS
- Record the current DNS zone, including A, CNAME, MX, TXT, and verification records.
- Back up mail-related records before editing. Replacing MX or mail-authentication records can interrupt email even when the website works.
- Confirm that the hosting plan accepts the domain and that you can obtain a certificate for it.
- Decide which version is canonical: usually one HTTPS hostname, with the other variants redirected to it.
Connect and verify the domain
- In the WordPress host’s domain settings, start the process to connect an existing domain.
- Copy the exact A-record or other DNS values supplied by the host.
- At the registrar, replace only the web records that the host instructs you to change. Preserve unrelated records for email and other services.
- Wait for DNS propagation, then return to the host dashboard and complete verification.
- Set the connected domain as the site address and issue or activate its HTTPS certificate.
- Open the homepage, a representative post, a page, a category or archive, and the login screen using the new domain.
WordPress permalink structures depend on server configuration. The official permalink documentation says the hosting provider should configure the web server for Pretty or Almost Pretty permalinks. If the homepage works but deep links return 404 errors, ask the host to correct that configuration before changing WordPress rewrite settings.
Method 4: Create a redirect on a self-hosted WordPress site
Self-hosted WordPress sites can issue redirects in PHP. WordPress documents the function as wp_redirect( $location, $status = 302, $x_redirect_by = 'WordPress' ). Its default status is 302, so specify 301 when the move is permanent. The function does not stop execution automatically and should almost always be followed by exit;.
Basic permanent redirect pattern
<?php
if ( wp_redirect( $url, 301 ) ) {
exit;
}
Place redirect logic where it can run reliably, such as a carefully managed plugin or the appropriate theme/bootstrap hook. Use a fully constructed destination URL, restrict the condition to the intended host or path, and test every branch. A broad rule that redirects the destination back to itself creates a loop.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #3
Choose the status deliberately
- 301: signals a permanent move and can be cached, so changing your mind may take time to reach every visitor.
- 302: the documented default for
wp_redirect(); useful when the destination is temporary unless you have a specific reason to use another temporary status. - 307: preserves the request method and explicitly represents temporary forwarding where your server or host supports it.
For a whole-domain migration, a server- or host-level rule is generally easier to maintain than running PHP on every request. Whichever layer you use, keep one authoritative rule and remove conflicting plugin, server, and proxy rules.
Method 5: Display external content with an iframe or masking plugin
An iframe can keep the outer WordPress permalink visible while loading an external URL inside the page. The WordPress.org Content Mask plugin describes three modes:
- Iframe: places the host URL in a full-width and full-height iframe.
- Download: fetches and caches external content.
- Redirect (301): sends visitors to the host URL.
Its documentation warns: “Do NOT use Content Mask on any content you aren’t explicitly authorized to share or use.” Obtain permission from the external owner before framing or downloading content, and comply with any terms that govern cookies, media, trademarks, or redistribution.
Understand iframe limitations
- The external server can send frame-blocking policies, causing a blank area or browser refusal.
- Cross-origin rules can prevent scripts in the frame from communicating with the WordPress page.
- External CSS, JavaScript, cookies, login flows, pop-ups, and payment screens may not work as expected.
- Links can navigate the top window or open outside the frame, making the experience inconsistent.
- The framed page remains hosted and maintained by the external service; an iframe does not give WordPress control of its content, uptime, or security.
Use an iframe for a narrowly defined presentation need, not as a substitute for a domain migration. If the external owner blocks framing, do not attempt to bypass that control; use an approved embed, an API integration, or a normal link instead.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Use the block editor’s supported embeds where possible
Since WordPress 5.0, the block editor can embed supported third-party content by pasting its URL into an Embed block. The content remains hosted externally. A supported embed is preferable to a generic masking plugin when it provides the exact content and behavior you need.
Rank #4
How the approaches differ
| Approach | Address bar | Paths and navigation | Search and canonical intent | Operational burden |
|---|---|---|---|---|
| 301 redirect | Changes to the destination | Requires rules for deep paths; navigation occurs on the destination | Appropriate for a permanent move to a new canonical URL | Maintain redirect rules, certificates, and destination links |
| 307 redirect | Changes to the destination | Temporary forwarding; path behavior depends on the rule | Signals that the original location may return | Review and remove when the temporary event ends |
| DNS-connected domain | Stays on the connected domain | WordPress handles internal links and permalinks after server setup | Appropriate when the connected domain is the real site address | Manage registrar DNS, hosting verification, SSL, and mail records |
| Iframe or masking plugin | Outer WordPress URL can remain visible | Often represents one framed destination; external navigation may escape the frame | Presentation layer rather than a canonical migration | Maintain plugin compatibility, permissions, frame behavior, and external dependencies |
HTTPS, reverse proxies, and redirect loops
An HTTPS loop often occurs when SSL terminates at a reverse proxy but the origin server believes the request is still HTTP. The proxy must forward the correct host and protocol information, and the origin must trust those headers in the way its platform expects. The public certificate must cover the domain visitors use.
Signs of a loop
- The browser reports “too many redirects.”
- HTTP changes to HTTPS and immediately changes back to HTTP.
- The homepage works from one hostname but loops on the www or non-www variant.
- Administration or login pages behave differently from public pages.
Temporarily disable duplicate redirect rules at the proxy, host, caching layer, and WordPress plugin. Keep one HTTP-to-HTTPS policy, verify the forwarded protocol and host, then test in a private browser session after clearing cached redirects.
Pre-publication testing checklist
- Test the homepage on the intended canonical HTTPS hostname.
- Open several deep paths: a post, a page, an archive, a search result, and a media URL.
- Check HTTP, HTTPS, www, and non-www variants and confirm that only the intended canonical form remains.
- Open login and administration URLs separately; authentication failures can reveal host or cookie mismatches.
- Inspect canonical links, internal navigation, feeds, sitemaps, and structured links for the correct domain.
- Confirm that CSS, JavaScript, images, fonts, and downloadable files load without mixed-content warnings.
- Test on a phone as well as a desktop. Full-height frames and responsive embeds commonly fail on narrow screens.
- Verify that DNS records for email and other services were not overwritten.
- Test from more than one network while DNS changes propagate.
Troubleshooting common failures
The address bar changes when I wanted it to stay the same
You configured forwarding or a redirect. Those methods intentionally send the browser to another URL. Use a DNS connection for a real second-domain site address, or an authorized iframe for a presentation-only frame.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsThe homepage works but post links return 404
Check that the host supports Pretty or Almost Pretty permalinks and that rewrite rules are configured. Then resave Settings → Permalinks once to refresh WordPress rules. Do not repeatedly change DNS while the server rewrite problem remains.
The frame is blank or says it refused to connect
The external server may prohibit framing. Check its published embedding policy and browser console, then obtain an approved embed or link instead. Do not try to defeat a frame-blocking policy.
Best Value
Images or scripts fail after connecting the domain
Inspect the page for hard-coded HTTP URLs, incorrect hostnames, and certificate errors. Update site and asset URLs to HTTPS, clear caches, and confirm that the certificate includes the exact public hostname.
Email stopped after the domain change
Restore the backed-up MX and authentication records, then verify them with your mail provider. Website A-record changes and mail records serve different purposes; replacing the entire DNS zone can remove both.
Visitors are redirected in circles
List every redirect layer: registrar forwarding, hosting rules, WordPress code, caching plugins, and reverse proxies. Remove duplicate rules, ensure the destination does not match the source condition, and verify that the proxy and origin agree on HTTPS.
A practical decision rule
- If you are permanently replacing one public URL with another, use a 301 or connect the new domain and redirect the old one.
- If the change is temporary, use a 307 or another temporary rule and document when it should be removed.
- If the second domain should host the WordPress site itself, connect it through DNS and configure SSL, permalinks, and canonical URLs.
- If you only need an external application or page visible inside a WordPress layout, use an approved embed or iframe and accept its cross-origin and maintenance limits.
Thinking in terms of the desired outcome—redirect, connected domain, or framed content—prevents the most common “masking” mistakes. It also keeps URL ownership, search signals, security, and maintenance responsibilities clear.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

