This article is not available in Indonesian, view it in English

Website URL frame in cPanel

A URL Frame operates in a manner similar to a URL redirect, with one key distinction: instead of sending visitors to a different webpage, it retrieves content from another server and presents it within a frame on your site. Importantly, once the content is displayed, the address bar in the browser will still reflect your domain name, rather than the redirected one.


Implement URL Frame Using HTML <iframe> Tag


The <iframe> tag enables you to incorporate another webpage within your current page. To establish a URL Frame, you must add the following HTML code to your site's main index file. Replace "example.com" with the desired URL to showcase, and "Site Title" with the name you wish to see 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>



To edit the index file for the domain, do the following:-

  1. Log in to cPanel.

  2. Go to Files > File Manager.

  3. Navigate to the document root for your domain where you want to set up a URL frame.

    • If it's the main domain for your hosting account, go to the public_html folder.
    • If it's an addon domain, the folder will be public_html/addondomain.com.
      In our example, we'll use public_html.
  4. In the root directory of your domain, create a new file called index.html by clicking on File.

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

  6. Add the code to set up the URL frame, then click Save Changes.

That’s it!


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.