Steps to Setup URL Frame in cPanel
Have you ever wanted to have your visitors redirected from your site to another site all while keeping your domain name in the address bar? This is referred to as a URL framing (masked forwarding) redirect. This bit of functionality can be useful for instances where you are using multiple domains, brand consistency, or you need an alternative way to manage redirects. So, if you follow these instructions using cPanel, you can easily set up a URL frame.
This guide is going to walk you through all of it, including:
What a URL Frame is and how it works?
How to set it up in cPanel step by step?
What to do if the server does not allow URL framing in cPanel.
Issues you will run into and how to troubleshoot them.
Let’s get started!
What is a URL Frame?
A URL Frame (also known as masked forwarding) allows you to load content from another site while keeping your domain in the browser address line. It means the user will use your domain and will never see the actual destination URL (only your domain).
URL Frame vs Standard Redirect Feature
Features | URL Frame (Masked) | Standard Redirect (301/302) |
URL in the Address Bar | Stays as it is | Changes to the defined URL |
The Impact of SEO | Can be negative | Passes SEO value |
Usage | For branding | SEO-friendly forwarding |
When Should You Use a URL Frame?
There are several reasons for using a URL frame. Let’s delve through them!
Brand Continuity: If you want to display content from another site but still want to maintain your domain name.
Short URLs: URL framing can also be used to mask a long affiliate link or a somewhat complicated URL.
Multiple Domains: Leverage using URL framing, when you have multiple domains pointing to the same content.
What Do I Need to Set Up a URL Frame in cPanel?
Before we get started, you will want to ensure you have:
Access to cPanel (as provided by your web hosting provider).
A registered domain name.
The URL that you would like to frame.
Now that you understand these points, we can move forward!
How to Create a URL Frame in cPanel (Step-by-Step Guide)
Let’s delve through the comprehensive guide to creating a URL frame in cPanel!
Step 1: Log into your cPanel
1. Open up your browser and navigate to https://yourdomain.com/cpanel.
2. Enter your username and password (as provided by your hosting provider).
3. Click Log in.
Step 2: Navigate to the Redirects section
1. After moving to the cPanel, go to the Domains section.
2. Then, click on “Redirects”.
Step 3: Configure your URL Frame in cPanel
Now we’re ready to set the redirection:
1. Under Type you will want to choose either Temporary (302) or Permanent (301). Permanent (301) is good for SEO, but it will not mask the URL. Whereas the Temporary (302) is Good for testing but does not pass SEO value.
2. Select the domain name you want from the dropdown.
3. For the Redirects To field, Type in what URL you want to be framed, for instance: https://targetwebsite.com
4. Under www Redirection, select Redirect with or without www.
5. Make sure the Wild Card Redirect is not checked.
6. Click Add.
Step 4: Test the URL Frame
Now let’s test to see if our URL frame is working:
1. Open your web browser and type in your domain name.
2. If your domain name stays in the address bar while the adjusted content appears from the target URL, you have successfully set up the URL frame!
3. If it does not work to display the content and still shows the original URL, try clearing your cache and testing again!
Creating a URL Frame Using .htaccess
If your cPanel does not allow URL framing, you can get the same effect with an .htaccess file. Steps to Create a URL Frame Using .htaccess are as follows!
1. Open File Manager in cPanel.
2. Go to the public_html folder.
3. Find the .htaccess file (make one if you can’t find one).
4. Edit and add the following code inside the .htaccess file.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ https://targetwebsite.com/$1 [P,L]
5. Save and close the file.
That’s it!
Now try your domain again, and if you still see the url masked, then your .htaccess won’t work!
Potential Problems and Fixes
Problem #1: URL Frame not working
Clear your browser cache and try again.
Check with your hosting provider if they support masked forwarding.
Problem #2: SSL Errors
Make sure that there are SSL certificates (HTTPS) on your domain as well as on the target URL.
Add this line in the .htaccess to force the HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Problem #3: SEO Concerns
Don’t do too much URL framing as it can lead to duplicate content penalties for SEO.
Add some meta tags to help with SEO.
<meta name=”robots” content=”noindex, nofollow”>
Conclusion
Creating a URL Frame in cPanel is a fast, simple, yet effective way to mask a URL to display content from another website. Whether you are doing it for branding, URL shortening, or domain management, if done right, it should go smoothly. If cPanel does not allow URL masking, using the .htaccess method is also a viable option.
Again, just be cautious with SEO and potential security issues.
Have questions in mind? Leave them in the comment section below!
Frequently Asked Questions
Does a URL Frame affect SEO?
Yes, it may flag framed content as duplicate content as far as search engines are concerned, so it’s best to use canonical tags or do the proper redirects for your SEO efforts.
Can I use a URL Frame to show another website’s content?
Technically yes! However, some websites do have X-Frame-Options, which can block framing.
What is the difference between a 301 and 302 redirect?
301 (Permanent Redirect) provides SEO value and changes the URL. Whereas 302 (Temporary Redirect) does not provide SEO value and retains the URL.
Can I frame an HTTPS site from an HTTP domain?
No. Modern browsers will block the mixed content from sites – this is usually for security reasons. Make sure both URLs have HTTPS.