We use cookies

This site uses cookies from cmlabs to deliver and enhance the quality of its services and to analyze traffic..

Where might you have seen our work?
Small places create combinations, but crosses that occur cannot provide many combinations. So be careful in making justifications, especially SEO.

How to Redirect Links Using .htaccess, WordPress, & cPanel

Last updated: May 25, 2023

Disclaimer: Our team is constantly compiling and adding new terms that are known throughout the SEO community and Google terminology. You may be sent through SEO Terms in cmlabs.co from third parties or links. Such external links are not investigated, or checked for accuracy and reliability by us. We do not assume responsibility for the accuracy or reliability of any information offered by third-party websites.

In managing a website, there are many elements that we need to pay attention to. One of them is the availability of the page when the user clicks on a certain link.

What you can use to optimize pages and links are redirect links. What is it? Should you learn how to redirect link?

The following guide article will discuss what a redirect link is, the types of redirect links, and how to redirect a link using Gator, WordPress, and cPanel. Immediately, check out the discussion below!

404 error should be redirected
Figure 1: 404, Error Code If Page Deleted Without Redirecting First

Redirect link, or URL redirect, is the activity of redirecting the URL of an old page to a new page.

When you type or click on the URL of the old page, you will be taken to a new page, which is a form of redirection from the old page.

This is useful for making sure users don't encounter 404 error pages, so they can still find something relevant to what they're looking for.

Redirect links can act as one of the SEO optimization strategies that prevent you from losing traffic.

Therefore, it is important for you to know how to redirect a link or a URL to a new page.

You can redirect links on a page-by-page basis or even at the domain level.

After knowing what a redirect link is, you will find out what its types are.

Find out the explanation in the following points:

1. Meta Refresh

When surfing the internet, you're bound to come across a page that says, "The original URL has moved; you're now being redirected. Click here if you're not redirected to the new page in 5 seconds."

This is what is called a meta refresh. Meta refresh is a redirect link that tells the browser to switch to a new page without the need to update the server.

When setting up a meta refresh, you can set the time it takes to redirect the old page to the new one.

Sometimes, search engines interpret a meta refresh in the same way as a 301 redirect, especially if the time given is 0–1 seconds.

However, meta-refresh is considered a redirect method with poor user experience, as it makes users wait a while to get to the page they are looking for.

Some sources say that it is better to use a 301 redirect instead of a meta refresh.

2. 301 Redirect

A 301 redirect is a type of redirect that allows you to permanently redirect a URL. Generally, this type of redirect is done at the browser and server levels.

301 redirects are the most common type of redirect used to forward all SEO authority to an existing URL.

Since search engines are able to recognize and index 301 redirects, this makes them the best choice for SEO practices.

According to Hostgator, a 301 redirect is a type of URL redirect that is claimed to be the most widely used by webmasters.

3. 302 Redirect

A 302 redirect is a URL or link redirect that is only temporary.

In general, this type of URL redirect is only used when you have the intention to return to the old URL.

For example, say you're revamping your site, but you want to redirect users to a different domain when the revamp is complete.

Or, if you want to A/B test two different versions of a page (the old and the new page) before moving to the new version entirely.

Since they are only temporary, 302 redirects are not used very often.

If you are thinking of using this redirect, you should consider whether to continue using a 302 redirect or whether it is better to use a 301 redirect directly.

simple ways to redirect link
Figure 2: Illustration of Redirect Link Implementation

Here are some simple methods on how to redirect link that you need to know:

1. Using .htaccess

The first note on how to redirect link is to use .htaccess. Redirect link to a new page can be done by following these steps:

  • Enter cPanel, then click "File Manager"
  • In the "Settings" section, tick "Show Hidden Files"
  • To redirect from www to non www, enter the following command: "RewriteCond %{HTTP_HOST} ^www\.yourdomainname\.com$RewriteRule ^/?$ "http\:\/\/yourdomain\.com\/" [R= 301,L]"
  • To redirect from non-www to www, enter the following command: "RewriteCond %{HTTP_HOST} !^www.yourdomain.com$ [NC]RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L, R=301]"
  • To redirect from one page to another, enter the following command: "RedirectMatch 301 /blog/(.*) https://www.websiteanda.com/$1"

2. Using WordPress

The second way to redirect links is to use the WordPress CMS.

The easiest way to do URL redirects in WordPress is to use a plugin. The most popular plugin for redirecting links is the "Redirect" plugin.

To perform a redirect using a WordPress plugin, you can follow these steps:

  • First, login to WordPress. After that, select "Plugins" in the menu on the left side of the screen. Click 'Add New', then look for the 'Redirect' plugin.
  • After finding the "Redirect" plugin, click "Install Now", then activate the plugin. Each plugin will have its own instructions as guidelines for its use. You can follow the instructions for using the "Redirect" plugin first.
  • Next, you will find "Redirect" listed under "Tools". Proceed to click "Redirect" and fill in the URL you want to redirect along with the new one you want to go to.
  • Finally, click "Add Redirect".

3. Using cPanel

Learn how to redirect link using cPanel. To perform a URL redirect using cPanel, you can follow these steps:

  • First, log in to your cPanel account, then scroll down to the "Domains" section. After that, find the "Redirect" icon and click on it.
  • In the dropdown menu under "Type", you can select 301 redirect or 302 redirect.
  • In the next drop-down menu, select which domain you want to set up redirects for. You can select "All Public Domain" if you want the update to apply to all domains that you own. However, if not, select the domain you want from the dropdown.
  • Next, fill in the page you want to redirect. In the first box, you only need to put the end of the URL in question, as the root domain name is already provided in the dropdown menu. In the second box, enter the full URL to be redirected to.

Thus, the discussion on how to redirect a link that you need to know.To help you manage your site, you can use SEO services from cmlabs.

This is because SEO services from cmlabs are not only able to solve on-page and off-page SEO problems on your site but also understand technical issues such as core web vitals and how to redirect link.

See you in the next guide!

Our valued partner
These strategic alliances allow us to offer our clients a wider range of SEO innovative solutions and exceptional service. Learn More
cmlabs

cmlabs

WDYT, you like my article?

Need help?

Tell us your SEO needs, our marketing team will help you find the best solution

Here is the officially recognized list of our team members. Please caution against scam activities and irresponsible individuals who falsely claim affiliation with PT cmlabs Indonesia Digital (cmlabs). Read more
Marketing Teams

Agita

Marketing

Ask Me
Marketing Teams

Irsa

Marketing

Ask Me
Marketing Teams

Thalia

Business Development Global

Ask Me
Marketing Teams

Robby

Business Development ID

Ask Me
Marketing Teams

Yuli

Marketing

Ask Me
Marketing Teams

Dwiyan

Business & Partnership

Ask Me
Marketing Teams

Rohman

Product & Dev

Ask Me
Marketing Teams

Said

Career & Internship

Ask Me
notif header image

Get Ahead of the Curve: Introducing Vanguard – Your Passport to Optimaze your Website. For more information, let's talk with our team.

Check

Stay informed with our new tool, cmlabs Surge. Discover popular trends and events!

Check

Your Opinion Matters! Share your feedback in our Plagiarism Checker Survey?

Check

There is no current notification..