Skip to content

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.

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.

To set up URL frame forwarding, you use an <iframe> element with some CSS to ensure proper sizing and styling.

  1. Open the index.html file of your site using cPanel File Manager or SSH with your preferred text editor.
  2. 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>
  1. Replace the following:

    • www.example.com with the URL of the site you want to load.
    • Title with the page title you want displayed in the browser tab.
  2. Save the changes to index.html.

  3. 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.

For more details on the <iframe> element, visit:
https://www.w3schools.com/tags/tag_iframe.asp