Best Ways to Redirect a Website URL Best Ways to Redirect a Website URL

Best Ways to Redirect a Website URL

URL redirection, which can also be said to be URL forwarding, is simply redirecting a user to another URL than what was promised earlier. URL redirection is a very common phenomenon in SEO, and you should be aware of why and how to redirect a website URL. Redirecting a user from one URL to another can sometimes give a poor user experience as the user may land on an unexpected page, but it is still better than landing on a broken page. To ensure that the user lands on one of the legitimate pages of the website, you have to implement redirection in the website.

Temporary and Permanent Redirect

As the name suggests, the difference is whether the redirect is temporary or permanent. In a temporary redirect you might restore the original URL in the future, while you will not do this for a permanent redirect.

A permanent redirect is also called 301 Redirect, and a temporary redirect is called 302 Redirect. Permanent redirects are mostly used as they pass the full link juice to the redirected link, which impacts SEO.

Why is URL redirection employed?

Let's look at why URL redirection is employed in SEO in the first place. Some reasons are:

URL shortening

You should send a page URL to people through email or text. Sending long URLs would look ridiculous and impractical, and you may even be afraid of being taken for a technological laggard.

A URL like https://example.com/product/category/dresses/category_B/subcategory_C/Foo/ can be replaced with https://example.com/Foo and still get you to the same page.

Using a short URL through applications like TinyURL and then employing a redirection will be a good idea in a case like this.

Using multiple domain names

You might have purchased multiple domain names for some good reason, and instead of keeping them idle, you would want them to point to the same website.

www.example.com and www. example. In and www.example.co.in and many more may point to the same website. One of the domains says www.example.com will be the primary domain on the hosting server. The remaining two domains will have to be redirected in that case to point to the same website, thus creating a redirection.

Moving to a New Domain

You should go to a new domain for some business reason. You might communicate this upcoming change on your website for your users to notice and remember. Ensure you take advantage of users. URL redirection is what needs to be employed. Even if a user goes to the previous domain, he will be directed to the new URL, and you will retain the traffic.

To Prevent Broken links.

If you do not employ redirection on the website, users may eventually land on a 404 error page instead of going to the intended link. It will also impact your SEO.

Good user experience and positive SEO impact should motivate any web admin to employ URL redirection.

Ways to Redirect a URL

Having been convinced of various reasons and the advantages of URL redirection, let's look at how to implement this.

URL's redirection from cPanel

This redirection is the simplest method to handle and does not require coding skills. Log into your cPanel and look for the redirect tab in it. Click the tab which will direct you to the redirect page.

You can easily select whether you want a temporary or permanent redirection. Select the domain and URL you want to redirect and fill in the link to which you want it to be redirected. You can further select whether you want WWW or not in redirection and then submit. Once done, you can find the list of all the redirections done through cPanel below the form.

URL's redirection using HTML meta tag

The meta refresh feature refreshes the [age after a small time gap, and the user is easily redirected to the specified URL. It is considered as a 301 permanent redirect allowing passage of link juice.

You can also redirect a user to another URL using the HTML meta tag by putting the code below in the HTML file's <head> section.

<meta http-equiv="refresh" content="0; url=http://www.anotherwebsite.com/" />

When the user lands on this page, this meta tag will redirect the user to http://www.anotherwebsite.com.

URL's redirection using PHP

The process here is similar to the one in HTML tag above. Create a file, say redirect.php, and place the code below.

<?PHP

header("HTTP/1.1 301 Moved Permanently");

header("Location: http://www.mynewwebsite.com/blog/");

?>

Whichever page you want to redirect, include the file in the page, and that's it. The first line of the code says that it is a permanent redirect, while the second line shows where it is to be redirected.

Redirection using the .htaccess file

.htaccess file can also easily handle URL redirection, and you do not have to change your website coding anywhere.

You can try out the three options below as per your requirement:

1. Redirecting only a specific page of the website

Redirect 301 /oldURL.html http://www.example.com/newURL.html

2. Redirecting the whole website

You will not have to write redirects for each page using the above method; instead, use the below code.

Redirect 301 / http://www.example.com/

It will redirect all pages to the new domain

3. Internal redirection from one page to another

If you are looking to redirect within the same website, use the below code:

Redirect 301 /example.com/oldpage.html http://www. example.com/newpage.html

These are some ways to redirect the URL.

Whatever method you use depends on your technical capabilities and does not make much difference. These URL redirection methods are very handy for web admins as they are required whenever you make changes in the URL.

Sumit

Author: Sumit

Sumit is an entrepreneur who loves trying out different business ideas and sectors. His vision and passion for entrepreneurship and the role digital media plays in it is very interesting.

Feel free to use images in our website by simply providing a source link to the page they are taken from.

-- AMITKK

Share views on Best Ways to Redirect a Website URL

Please keep your views respectful and not include any anchors, promotional content or obscene words in them. Such comments will be definitely removed and your IP be blocked for future purpose.

Please Wait

Want to publish your blog with us?

Secrets of our Work Revealed in Blogs
View All
  • SEO Copywriting - Tips to Create Great Content 2nd Aug 2022
    SEO Copywriting - Tips to Create Great Content
  • Influence of Nano Influencers in digital  marketing 21st Apr 2023
    Influence of Nano Influencers in digital marketing
  • Influencer marketing strategy 10th Dec 2020
    Influencer Marketing Strategy
  • Safeguarding Your Mobile App in a Regulated Landscape 8th Jul 2023
    Safeguarding Your Mobile App in a Regulated Landscape
  • Landing page vs website - What's the Difference 21st Apr 2022
    Landing Page vs Website - What's the Difference
  • Importance and Benefits of Graphic Designs for Your Business 11th Oct 2020
    Importance and Benefits of Graphic Designs for Your Business
  • Advanced Landing Page Design Techniques 18th Feb 2023
    Advanced Landing Page Design Techniques
  • Lead Generation Tactics that works 22nd May 2022
    Lead Generation Tactics
  • LinkedIn Marketing Strategy 23rd Jan 2021
    LinkedIn Marketing Strategy for Business
  • How to Optimize Website for Local SEO 6th Jul 2023
    How to Optimize Website for Local SEO
  • Android Application Development Companies in Delhi 10th Dec 2020
    Android Application Development Companies in Delhi
  • How Digital Marketing Boosts Sales for Pet Product Business 1st Jan 2024
    How Digital Marketing Boosts Sales for Pet Product Business
  • WordPress Themes 5th Mar 2020
    WordPress Themes
  • How to Increase Your Presence on Search Engine without Investing a Single Rupee 15th Jul 2020
    How to Increase Your Presence on Search Engine
  • Web App Development Company In Delhi 10th Dec 2020
    Web App Development Company In Delhi
Secrets of our Work Revealed in Blogs Secrets of our Work Revealed in Blogs
Our Offices
Gurgaon

Second FLoor, 1172, Sector- 45, Near DPS School, Gurgaon, Haryana- 122002

Rewa

HIG 3/11/152, Infront of Anand Park, Nehru Nagar, Rewa, M.P - 486001

Mumbai

Sar Park view, B 602, Plot- 31 & 45, Sec- 30, Kharghar - 410210

Connect with AmitKK on Whats App