Setting up URL frame forwarding
This guide explains how to set up URL frame forwarding to display content from another site while keeping your domain name visible in the browser’s address bar.
About URL Frame Forwarding
Section titled “About URL Frame Forwarding”URL frame forwarding allows your site to load content from another domain while keeping your own domain name in the browser’s address bar.
For example, if your domain is example.com, you can display content from ruachost.com while visitors continue to see example.com in the address bar.
Setting Up URL Frame Forwarding
Section titled “Setting Up URL Frame Forwarding”To set up URL frame forwarding, you use an <iframe> element with some CSS to ensure proper sizing and styling.
- Open the
index.htmlfile of your site using cPanel File Manager or SSH with your preferred text editor. - Copy and paste the following code into
index.html:
<html><head> <title>Title</title></head><style>body { margin: 0; padding: 0;}body, iframe { width: 100%; height: 100%;}iframe { border: 0;}</style><body> <iframe src="http://www.example.com"></iframe></body></html>-
Replace the following:
www.example.comwith the URL of the site you want to load.Titlewith the page title you want displayed in the browser tab.
-
Save the changes to
index.html. -
Open your web browser and visit your domain. You should see the content of the external site while your domain name remains in the browser’s address bar.
More Information
Section titled “More Information”For more details on the <iframe> element, visit:
https://www.w3schools.com/tags/tag_iframe.asp