Chat with us, powered by LiveChat

How to Redirect a URL in WordPress?

If you’re using WordPress, you have a lot of company. It powers over one-quarter of the Internet, with 75 million users. Nearly 15% of the top 100 websites in the world use WordPress.

The more you use WordPress, the more you learn about its great tools (provided through WordPress plugins) that handle everything from protection against hackers to checking your SEO efforts. Best of all, WordPress grows with your business, so you can never have “too many pages.”

However, with lots of pages comes lots of responsibility, to paraphrase Peter Parker’s Uncle Ben. You might find you need to move pages to new parts of your website. That’s easy enough to do, but you also don’t want search engines to think the information under the old URL has disappeared. A URL redirect solves the problem.

What is a URL Redirect?

A URL redirect is a way to remap a web page address. It’s actually quite similar to the way the post office handles changes of address. A person or business provides information about the new address, and the post office lets everyone who sends mail to know about it.

The same thing happens on the web. The information is still there but on a new page. A URL redirect tells search engine web crawlers where that information has now been placed.

3 Types of Redirects

There are three basic types of redirects.

  • A 301 redirect is used when a web page has been permanently moved.
  • A 302 redirect is used for a temporary webpage move.
  • A meta refresh tells a browser to refresh a site after a given number of seconds.

A 301 Redirect is the Most Common Type and Signals a Page has Moved

Most redirects are 301 types that handle content moves to different pages and URLs on or off the site, perhaps to a new website.

E-commerce sites use a lot of 301 redirects as they move products around to different parts of the site. As an example, a new product might be featured on a page for new products. After a few weeks, it gets moved to another page where it’s featured with similar or complementary products. Finally, when a new version is about to be released, it might be moved to a sales page to clear it out of stock.

There are a number of WordPress redirect plugins that can simplify this process. These plugins will also work on WooComerce websites as well.

301 Redirect

A 302 Redirect Indicates a Temporary Move

A 302 redirect would be used for a few different reasons:

  • While updating a page
  • While conducting A/B tests of pages presenting the same information in different ways
  • While a page is being reviewed by clients or higher-ups and you don’t want it to be included in site ranking just yet

Meta Refresh May Be Spam!

Most meta refreshes appear to be spam. These are the ones that say if you aren’t redirected within five seconds, click this link. If the website has good security, it will block the spam and load the information you were looking for.

Sometimes a business may want to use a meta refresh to explain that a familiar website has been changed, particularly if the business the website represents has been sold.

Why Implement a Redirect Command?

Redirect commands are necessary to tell search engines that a page has moved. Here are a couple of reasons this would happen:

  • A new domain name, common when a business has been sold or otherwise undergoes a name change
  • Changing the organization on a website, common as a website site and business grow.
  • Redirects can also help search engines understand which page is the real “expert” source when several pages owned by the same entity have the same information.
  • If there’s been a typo in a printed ad campaign or email, a redirect on the accidental page solves the problem!

eCommerce sites often have pages with duplicate content, but only one page should be the one for search engines to recognize as the “expert” to list on search engine result pages (SERPs). That page should be identified as the “canonical” page. Usually, a 301 link is the right move, but sometimes a canonical link — similar to a 301 — works better for SEO purposes.

Or let’s say you’re running several advertisements using blogs, video, text messages, and other marketing techniques. A redirect from each of these sources to a single page where people can get more information, order a product or service or otherwise answer the CTA, makes it easier to track the effectiveness of different ad campaigns.

Finally, redirects are pretty much protected when it comes to SEO. Having the proper link will have little to no impact on “link juice,” the authority that the original page carried with search engines.

Redirects are Useful Tools When Moving to a New Domain

Moving a site to a new domain may be necessary after a business has been purchased by a larger entity that wants to integrate it into its own website. Or, a business may have changed hands or rebranded and a fresh new look is needed. This might include a new business name.

However, no one wants to lose their current search rankings. 301 redirects are excellent ways to preserve a ranking while introducing new ownership, branding, or a “new and improved” marketing approach. WordPress redirection plugins are very useful tools for this purpose.

Forwarding Multiple Domains

Many businesses buy several domain names that are similar to what they already own, to prevent competitors from “stealing” their name or brand. A redirect allows them to direct all searches to a single authority website.

Other businesses may work with lots of subdomains and want to explicitly point to an authoritative page rather than be seen by search engines as separate entities. There are WordPress redirection plugins that handle these situations as well.

Changing Pages or Website Structure

WordPress is highly scalable, making it an excellent choice for businesses that foresee growth. Growth inevitably means restructuring the website and changing pages to reflect new and expanded products and WordPress services.

There’s no reason to lose search authority when a site is re-structured. So, it’s essential to recognize where to insert redirects so search engines don’t think a page has disappeared.

Redirects Can Fix and Even Cover Up Emergencies (404)

Everyone makes mistakes, and redirects are one way to cancel out one of the more embarrassing ones: typos that send viewers to the wrong page. If they go to a page that doesn’t exist, they will see a 404 error message with this information.

Usually, typos are easily corrected but errors are usually permanent when they appear in emails or print campaigns. If the false URL is at least within the right domain, create that page and insert a redirect to the correct page. It’s a faster solution than creating and sending a new email.

It’s hard not to overstress the importance of redirecting a page to its new location. Neglecting to do this can result in the worst scenario in terms of site visits: visitors looking for the page land on one marked “404: Page does not exist.” It’s hard to recover from that one!

Improper redirections are just as bad and lose the opportunity for a site visit.

Here are a few examples of improper redirections:

  • Sending all redirects to the new homepage

Visitors aren’t looking for your new home page. They want a specific page. If you have a large website, you’ll probably lose them because few people will take the time to research your website for the page they want, even if you offer a search box.

  • Installing too many redirect commands

If you’re going to move a page, do it once, or at least once every several years. Otherwise, you risk creating a “redirect loop” that confuses search engines and may halt the search altogether.

  • Installing the wrong redirect

Remember, 302 redirects are meant to be temporary.

How to Create Redirects in WordPress with Plugins

First, let’s discuss how to find a plugin. WordPress has a pretty thorough depository you can access directly from the plugin page, which you’ll find on your dashboard. Click on “add new” and search for plugins. Click on the one you want to use and activate it.

Now go back to the dashboard and click on the plugin name to customize settings. This will let you decide what to exclude from creating a redirect command. If the plugin handles different types of redirects, it will let you choose when to use a 301 or 302 redirect command. It will also let you set parameters such as the default URL to use for redirects, which is useful if you’re migrating pages to another site.

Other redirect plugins automatically insert the redirect command whenever a new URL is created for an existing page or post or walk you through a process where you specify the new URL.

There are plenty of 301 WordPress redirect plugins. Here are a few that are widely recommended by the experts.

  • Simple 301 Redirects: How to

Simple 301 Redirects is highly recommended for its simplicity and its developers’ conscientiousness about regular updates for security purposes. (Unfortunately, plugins are often the cause of site failures.)

In addition to providing redirects for an existing WordPress site, it also handles page migrations from other, non-WordPress websites where there’s a chance that URLs won’t be preserved. It has a 4-star rating and more than 300,000 downloads.

  • Simple 301 Redirects – Bulk Upload: How to

Simple 301 Redirects – Bulk Upload is actually an add-on to the Simple 301 Redirect plugin that helps manage a lot of redirects all at once by permitting you to create a CSV file of old URLs to import for the purpose of creating new URLs. It also checks for duplicate URLs. It’s earned 4.5 stars from 20,000 downloads.

  • Redirection: How to

Redirection is another 4-star plugin and has had more than one million downloads. In addition to easily handling redirects according to your specifications, it’s an excellent tool for detecting and alerting you to 404 error messages.

Redirection creates a manager page where all issues are listed and can be acted upon. In addition, its settings allow you to specify who has access to the plugin, what browsers to include or exclude, and follow filters you create.

“I can’t believe this is a free plugin” a reviewer recently posted.

  • Safe Redirect Manager: How to

Safe Redirect Manager is a 5-star plugin that handles all status codes, which are messages, usually hidden, that report how a request to bring up a certain page is performed.

There are five levels, with 300-level codes reserved for redirects. This plugin works with the other codes as well, including the dreaded 404 code that indicates a page hasn’t been found (and usually the only code that’s visible). As far as handling 300 codes, it’s easy to set up and works quickly. It asks what URL to direct, the destination URL for it, and the status code you want.

Other WordPress Redirection plugins provide additional services such as repairing crawl errors that can happen during redirection and impact SEO effectiveness. Others are useful if you’re migrating your site for SSL purposes (changing from http:// to https://), which has become one of the ranking factors search engines consider. In addition, Chrome and some other browsers will block or at least warn that sites with the old http:// designation are unsafe.

How to Create Redirects in WordPress with .htaccess

Another way to redirect pages is to use something called the .htaccess command; in other words, coding your WordPress site yourself. This ensures the redirect will work and is good if you’re trying to avoid over-reliance on plugins or if you simply want to learn a bit of coding to stretch out the old brain cells.

Editing this file will also quickly solve the puzzle of how to direct a URL for WordPress sites that are being renamed. It’s also useful when a site is transferring to a secure socket layer (SSL), which will change the http:// command at the start of the URL to https://.

Recently, Chrome began issuing warning statements that sites without the https:// designation were insecure. Technically, they’re correct but more importantly, this can scare away or even prevent visitors from accessing a site. Sites that switch to SSL get a slight bump up in Google search.

The .htaccess command lives in something called the WordPress root directory that’s found in something called the cPanel your host maintains. The cPanel holds all the files your WordPress site generates. You can use it to look at them and edit as needed. It’s not a bad idea to visit the cPanel to better see the files that power WordPress. Think of it as reviewing an owner’s manual.

Here’s how to set up this permanent redirect:

  1. Log into your host and go to your dashboard to locate the cPanel.
  2. Click on the panel, and under Files, click on File Manager.
  3. Look for the .htaccess file and highlight it.
  4. Click on the “edit” command — you can’t actually open this file — or download it to Notepad and upload the file when you’re finished.

Here are the most common commands to use for redirects. Insert them before the last line in the file to redirect single pages:

  • Redirect 301 /old-page-here.html https://www.yournewwebsite.com/new-page-here.html

Use http:// if your site hasn’t migrated to SSL. If you’re redirecting the entire site to an SSL or to a new name, use this command:

  • Redirect 301 / https://www.yournewwebsitehere.com

Be sure to check with your host about the exact language. Some WordPress hosts use different commands and at least one recommends using the WordPress config file for websites changing to SSL.

You can also program in 302 redirects this way — just be sure to remove them when you have completed your rewrites, internal review, or A/B testing and are ready to designate a permanent web page.

.htaccess files only work with Apache web server software. Just about all WordPress sites use Apache, which is also an open access product free to anyone who wants to use it and can be adapted to specific needs — just like WordPress.

Don’t underestimate the importance of redirecting pages. You’ve worked hard to build up your website’s visibility. Redirects are tools that help you preserve all that effort, particularly when you’re working on site reorganization or introducing a new brand.

Feel free to browse through our blog section to find more interesting articles about this and similar topics.

Comment

There is no comment on this post. Be the first one.

Leave a comment