Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Set Up a URL Frame in cPanel

This guide shows you how to make one domain show a page from another address, while the address bar keeps your domain name. This is called URL framing or masking.

Domains and DNS2 min read11 steps6 screenshots

What is a URL frame?

A URL is a web address. A frame is a window that shows another page inside it. With a URL frame, a visitor types yourdomain.com, but sees content from a different address. The address bar keeps showing yourdomain.com. It is like a picture frame on your wall that shows a view from another house.

When is it used?

  • Your site lives at a long address on a free service, and you want a short name.
  • You want one domain to show the content of another site.

Know the downsides

  • Some sites block being shown in a frame. They will appear blank.
  • Search engines may not rank a framed page well.
  • Links inside the frame may not change the address bar.
  • Phones may show the page badly.

For most sites, a normal redirect is better. A redirect sends the visitor to the new address, and the address bar changes.

How cPanel does it

Older versions of cPanel had a Redirects tool only. Framing is usually done in the DNS zone, with a service that supports it. Some hosts give a URL Frame or Web Forwarding option in the domain management page. Since this differs, look at what your account offers.

Steps with a simple HTML frame page

  1. Log in to cPanel.
  2. Open File Manager.
    Screenshot: Open File Manager .
    Screenshot: Open File Manager .
  3. Go to the public_html folder of your domain.
    Screenshot: Go to the public_html folder of your domain.
  4. Click + File and name it index.html.
    Screenshot: Click + File and name it index.html .
  5. Right-click the file and choose Edit.
    Screenshot: Right-click the file and choose Edit .
  6. Paste the code below. Replace the web address with the one you want to show.
<!DOCTYPE html>
<html>
<head>
<title>My Site</title>
<style>html,body,iframe{margin:0;padding:0;height:100%;width:100%;border:0}</style>
</head>
<body>
<iframe src="https://www.example.com/mypage"></iframe>
</body>
</html>

This page fills the whole window with the other site, inside an iframe. An iframe is an HTML tag that shows another page in a frame.

  1. Click Save Changes.
  2. Open your domain and test it.
Warning: This replaces any index.html that is already there. Make a copy first.

A normal redirect instead

  1. In cPanel, open Domains, then Redirects.
  2. Choose the type, pick the domain, and type the target address.
  3. Click Add.

Need help? Open a support ticket.

Quick recap

  • A URL frame shows another page under your domain name.
    Screenshot: A URL frame shows another page under your domain name.
  • It has downsides for search engines and some sites block it.
  • You can build one with an index.html and an iframe.
  • A redirect is usually the better choice.