How to set up URL Frame in cPanel
- Category : cPanel Question
- Posted on : May 13, 2020
- Views : 1,318
- By : HostSEO
URL Frame works similar to URL redirect except that instead of redirecting the visitor to your web page, the web page will be fetched from the other server and displayed in a frame. The difference is that after redirection, the browser's address bar will continue to display your domain name.
Unfortunately, there is no tool in cPanel which would automatically set up URL frame. However, you are still able to do that using certain HTML tags in your site index file.
- <iframe> tag
The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document.
To set up URL frame using this tag, insert the following code into your main index file and save the changes (make sure example.com is replaced with the destination domain and Site Title with the actual site name you wish to be displayed in the browser tab):
<html>
<head>
<title> Site Title </title>
<style>
body {
margin: 0;
padding: 0;
}
body, iframe {
width: 100%;
height: 100%;
}
iframe {
border: 0;
}
</style>
</head>
<body>
<iframe src="http://example.com"> </iframe>
</body>
</html>
The <noframes> element holds one or more elements, each element can hold a separate document, so there will be multiple pages fetched into your index page.
To set up URL frame using the <noframes> tag, insert the following code into your main index file and save the changes (make sure example.com is replaced with the destination domain and Site Title with the actual site name you wish to be displayed in the browser tab):
<html>
<head>
<title>Site Title</title>
</head>
<frameset cols="50%,50%">
<frame src="https://example.com">
<noframes>Sorry, your browser doesn’t support frames. </noframes>
</frameset>
</html>
NOTE 1: <noframes></noframes> tags are not supported in HTML5. Starting from it, only <iframe> tag is used.
NOTE 2: Both tags are used to frame static websites mostly. There is no way to guarantee a proper performance if you set URL frame for a non-static website.
To edit the index file for the domain, do the following:
1. Log into cPanel.
2. Navigate to the section Files > File Manager menu:
For cPanel Basic Theme:
For cPanel Retro Theme:
3. Move to the document root option for your domain you need to set up URL frame for.
If it is the main domain for your hosting account, you need to go to public_html folder. If it is an addon domain, the folder will be public_html/addondomain.com.
We have public_html in our case:
4. Once you are in the root directory of your domain, create an index.html file by clicking on File :
5. Right-click on the file and select Edit:
6. Insert the code for setting up URL Frame and Save Changes:
That's it!
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu