How to Set Up URL Masking

At times, you may have a site created on a different domain name or directory and don’t want your visitors to see the full path to your files.

Fortunately, with just some simple steps, you can set up URL masking to have your visitors see what you want them to see without having to show them the full URL where the files are actually located. You would merely need to follow these steps.

For this example, we will have yourdomain.com show the contents of yourdomain.net/sitefiles however, you can replace these domain names and URLs with your specific domain names and URLs.

1) You would first need to make sure that your site is loading perfectly at domain.net/sitefiles. If it is loading correctly, you should have no problems.

2) Create an index.html file in the public_html (or www) folder on your yourdomain.com site. Also, be sure that there is not an “index.php” file in the same directory as that will take precedence over the index.html file you have created and load up when visitors access your site.

3) Add the following text to the index.html file and modify the title and frame src

<html>
<head>
<title>Your Website Title</title>
</head>
<frameset rows="100%,*" border="0">
<frame src="http://yourdomain.net/sitefiles/" frameborder="0" />
<frame frameborder="0" noresize />
</frameset>
</html>

What this will do is create a frame on the domain.com site that will fill the entire page. Then, when your visitors access yourdomain.com, they will only see the content of yourdomain.net/sitefiles.

And that’s it! You have now created a frame to mask your site’s URL.

Updated on September 30, 2019

Was this article helpful?

Related Articles

Need help?
We're always here for you. Submit a ticket or Chat with a live person.
Submit Ticket