Knowledge Base
MilesWeb / cPanel

Steps to Setup URL Frame in cPanel

Approx. read time : 3 min

The working of URL Frame is similar to URL redirect. The only difference is that rather than redirecting the visitor to your web page, the web page gets fetched from the other server and displayed in a frame. Moreover after redirection, the address bar of the browser will continue displaying your domain name.

Unluckily, you won’t get any tool in cPanel that can automatically set up URL frame. But, you can still do that with the help of certain HTML tags in your site index file.

<iframe> tag

The <iframe> tag defines an inline frame which is used to embed another document within the current HTML document.

For setting up URL frame using this tag, insert the following code into your main index file and save the changes (ensure to replace example.com with the destination domain and Site Title with the actual site name that you want to be displayed in the browser tab):

The <noframes>  element comprises of one or more elements. Each element has the ability to hold a separate document, so there will be multiple pages fetched into your index page.

For setting up URL frame with the <noframes> tag, insert the following code into your main index file and save the changes (ensure to replace example.com with the destination domain and Site Title with the actual site name that you want to be displayed in the browser tab):

Note 1: HTML5 doesn’t support <noframes></noframes> tags. Therefore, only <iframe> tag is used from the start.

Note 2: Mostly static websites can be framed with both tags. One can guarantee better performance, if URL frame is set for a non-static website.

Steps to Edit the index file for the Domain

1. Log into your cPanel account.

2. Go to Files > File Manager.

3. Navigate to the document root option for your domain for which you need to set up URL frame.

In case it is the main domain for your hosting account, go to public_html folder. In case it is an addon domain, go to the folder public_html/addondomain.com. Here we have public_html.

4. After going to the root directory of your domain, create an index.html file by clicking on File.

5. Right-click on the file and select Edit.


Click on Edit again when asked for confirmation.

6. Insert the code to set up URL Frame and click on Save Changes.


That’s it! You have learnt to set up URL frame in cPanel.

 

Avatar
Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.
Need help? We’re always here for you.
Register Your Free Domain Name
OFFER EXPIRES IN
04
min
59
sec