Cloud Service >> Knowledgebase >> cPanel >> Steps to Setup URL Frame in cPanel
submit query

Cut Hosting Costs! Submit Query Today!

Steps to Setup URL Frame in cPanel

Setting up a URL frame (also known as a URL redirect or masked redirect) in cPanel can be done using the "Redirects" feature. Here’s how to do it step-by-step:

Steps to Setup a URL Frame in cPanel

Log in to cPanel:

Access your cPanel account through your web hosting provider.

Navigate to Redirects:

In the cPanel dashboard, look for the Domains section.

Click on Redirects.

Choose the Redirect Type:

You will see options for Permanent (301) or Temporary (302) redirects. Choose based on your needs.

For a URL frame, a Temporary (302) redirect is often preferred, but it depends on your use case.

Select the Domain:

From the dropdown menu, select the domain you want to redirect.

Enter the Redirect Destination:

In the Redirects to field, enter the URL you want users to be redirected to.

Set the Redirect Options:

Check the box for "Wild Card Redirect" if you want to redirect all pages under that domain to the new destination.

Important: If you want to maintain a frame effect, you might need to use HTML code on your destination page.

Add Redirect:

Click on the Add button to create the redirect.

Confirm the Redirect:

You should see a confirmation message indicating that the redirect has been created successfully.

Note on URL Frames

While the steps above set up a redirect, creating a true URL frame (where the URL stays the same in the address bar) typically requires additional HTML code or using an HTML iframe on a specific page. Here’s a simple example of an iframe:

Create a New HTML File:

In cPanel, go to the File Manager and navigate to the directory where you want the frame.

Click on + File to create a new HTML file (e.g., index.html).

Edit the HTML File:

Open the newly created HTML file and insert the following code:
html

 HTML File:

Save the File:

Save the changes.

Final Steps

Test the Redirect: Visit the original URL to ensure it correctly redirects to the intended destination or displays the iframe as intended.

Monitor Performance: Keep an eye on any issues that may arise, as some sites may not allow framing due to security settings (like X-Frame-Options).

 

This should help you set up a URL frame effectively using cPanel! If you have any specific requirements or encounter issues, feel free to ask.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!