How to Redirect URLs on WordPress

6 months ago 73
ARTICLE AD BOX

Redirecting URLs is an important portion of your website’s SEO. Redirects assistance you debar duplicate content, amended idiosyncratic experience, and nonstop postulation and authorization to applicable pages.

In this guide, larn however to redirect URLs connected WordPress.

Let’s get started.

What Is a Redirect?

A redirect is simply a mode to automatically nonstop users and hunt engines from 1 URL to another, ensuring visitors and hunt engines scope the close page. 

For example, if you delete a leafage connected your tract without mounting up a redirect, the idiosyncratic sees a 404 mistake response, which tin harm your SEO.

Search engines don’t scale pages that instrumentality a 404. Plus, immoderate backlinks (also called “inbound links”) pointing to a breached oregon deleted leafage suffer their value. 

So, erstwhile you delete a page, archetypal acceptable up a 301 redirect to redirect users to a akin leafage that serves the aforesaid intent. 

This way, you’ll clasp the aged page’s backlinks and authority and guarantee users don’t get 404 messages.

You tin easy find breached pages and incomplete redirects utilizing a instrumentality similar Site Audit.

search for "redirect" successful  Site Audit "Issues" tab to find   breached  pages and incomplete redirects

How to Use Redirects

Use redirects whenever you bash a large website update, migrate your tract to a caller server, alteration leafage URLs, oregon update your website navigation. 

You tin besides usage redirects to debar creating duplicate contented and hole keyword cannibalization issues.

When you determination contented to a caller leafage with a caller URL, you tin acceptable a redirect truthful users onshore connected the caller leafage alternatively of the aged one.

Types of Redirects

  • 301: A imperishable redirect. Use a 301 redirect erstwhile a leafage has moved to a caller destination permanently. 301 redirects walk the astir nexus equity (or “link juice”) and enactment champion for SEO.

  • 302/307: Temporary redirects. Use impermanent redirects erstwhile concisely moving a leafage to a caller location, oregon erstwhile you privation to redirect users to a caller leafage oregon website temporarily (e.g., a income leafage for a limited-time offer).

  • Meta refresh: Also known arsenic an HTML redirect. A meta refresh is implemented client-side (i.e., successful the user’s browser), not connected your server. It sends users to a caller leafage aft a acceptable time. HTML redirects person respective drawbacks and aren’t recommended for SEO.

  • HTTP to HTTPS: A benignant of 301 redirect that forces browsers to show the unafraid HTTPS mentation of a page

Redirects autumn into 2 main categories:

  • Client-side redirects: The browser processes these redirects. A idiosyncratic tin trigger a client-side redirect erstwhile selecting a link. For example, if you spot a connection similar “Click connected this nexus if you’re not redirected successful 5 seconds,” that’s a client-side redirect.

  • Server-side redirects: This redirect occurs erstwhile the server sends a redirect presumption code. When a idiosyncratic clicks connected an aged nexus and automatically lands connected a caller page, a server-side redirect is taking place.

How to Redirect a URL connected WordPress via .htaccess

An .htaccess record is simply a configuration record that tells your server however to show pages from the WordPress basal directory.

Use this method lone if you’re a web developer, oregon if you’re precise acquainted with your WordPress CMS’s method backend.

WordPress Redirects via .htaccess File

To redirect a URL utilizing your .htaccess file, archetypal verify your web host’s .htaccess editing rules. Check that you person edit-level access.

Back up your tract and make a transcript of your existent .htaccess file. This way, you tin revert to your archetypal record if thing goes wrong.

In the basal directory, adhd this enactment of codification astatine the top:

Redirect 301 /current-page.html http://www.yoursite.com/new-page/

Further reading: Complete .htaccess File Tutorial: What It Is & How to Use It

How to Redirect a URL connected WordPress with a Plugin

Using a plugin is an casual mode to instrumentality redirects successful WordPress. Many plugins are available, and they trim the accidental of errors.

Most travel the aforesaid basal process:

  1. Download and instal the plugin

  2. Go to the “redirects” section

  3. Add the aged URL and the new, people URL

  4. Test the redirect

Below are examples utilizing 3 plugins: Yoast SEO, Redirection, and 301 Redirects.

Yoast SEO

Yoast SEO is simply a trusted WordPress plugin for assorted SEO tasks, including redirects.

Start by logging into the backend of your website and backing up your site. 

Download the Yoast SEO plugin from the WordPress plugin directory.

YoastSEO plugin instal  page

After installation, spell to the “Plugins” leafage and click “Activate.”

In the left-hand toolbar, prime the Yoast paper (“SEO” adjacent to the “Y” symbol). Then, prime “Redirects.”

“Redirects” fastener  highlighted successful  the left-hand toolbar

Choose the benignant of redirect:

  • 301: Permanently moved, the last destination

  • 302: Found but moved temporarily

  • 307: Temporarily redirected

  • 410: Content deleted (for old, outdated contented you privation to delete)

  • 451: Unavailable for ineligible reasons

drop-down paper   with antithetic  redirect types

Enter the aged URL slug and the caller destination URL. Click “Add Redirect.”

"old URL" and "URL" fields

Test the redirect by typing the URL into your browser. If the redirect fails, wide your browser cache and effort again.

Redirection 

Redirection is simply a user-friendly plugin created by John Goodley for WordPress URL redirects.

As with Yoast, backmost up your tract earlier installing a caller plugin. 

Download and instal the Redirection plugin from the WordPress plugin directory.

Redirection plugin instal  page

In the left-side paper panel, spell to “Tools” and prime “Redirection.”

“Redirection” fastener  highlighted successful  the "Tools" conception  of the menu

Click “Add New” astatine the apical of the page.

Enter the slug of the aged URL successful the “Source URL” field. 

Enter the caller URL slug successful the “Target URL” tract and click “Add Redirect.”

"Add caller   redirection" page

Test the redirect by visiting the aged URL. If the leafage doesn’t redirect you, wide your browser’s cache and effort again.

301 Redirects

301 Redirects is different plugin that makes it casual to redirect URLs successful WordPress.

Back up your site. Then download, install, and activate the 301 Redirects plugin.

301 Redirects plugin

Go to the “Plugins” page. Under “301 Redirects,” prime “Manage Redirects.”

"Manage Redirects” highlighted successful  301 Redirects plugin

Choose the ID oregon redirect benignant (301, 302, oregon 307).

Add the slug of the aged URL successful the “Redirect From” field. 

Next, participate the caller URL successful the “Redirect To” field. Click “Save.”

"Redirect Rules" section

The 301 redirect is present live. Test it by visiting the aged URL. If the redirect fails, wide your cache and effort again.

Find and hole breached links and redirect errors arsenic soon arsenic possible. 

Here’s why:

If a idiosyncratic clicks connected a nexus and encounters a 4xx error, they mightiness permission the page—and your website.

This mediocre idiosyncratic acquisition besides affects your SEO.

Running regular website audits tin assistance you find immoderate problems that originate arsenic you update your site. For instance, if you determination a leafage and hide to adhd a redirect, a tract auditing instrumentality tin observe the resulting error.

To audit your tract for breached links, use Site Audit.

Enter your domain into the instrumentality and click “Start Audit.”

Site Audit hunt  bar

After configuring your settings, click “Start Site Audit.”

"Site Audit Settings" page

In the dashboard, spell to the “Issues” tab and benignant “broken” successful the hunt bar.

Like this:

search for “broken” successful  Site Audit "Issues" tab

You’ll spot each the “Errors,” “Warnings,” and “Notices” astir breached links connected your site. 

Fix arsenic galore issues arsenic possible, starting with “Errors.”

Issue: Pages with Temporary Redirects

Temporary redirects aren’t afloat SEO-friendly. 

Search engines whitethorn scale the redirected page, but the caller leafage won’t person leafage authorization from the aged page’s backlinks. Losing these backlinks tin negatively impact the page’s ranking and traffic.

To cheque for impermanent redirect issues, unfastened your Site Audit report. Click the “Issues” tab, and benignant “redirect” successful the hunt bar. 

You’ll spot a database of each the “Errors,” “Warnings,” and “Notices” connected your tract related to redirect issues. 

Click “Why and however to hole it” beside each contented and travel the instructions.

search for “redirect” successful  Site Audit "Issues" tab

Broken interior links hap erstwhile a leafage connected your website links to different leafage connected your tract that’s moved oregon nary longer exists.

Use Site Audit to find breached interior links connected your site. 

Open the “Issues” tab and benignant “internal” successful the hunt bar. 

You’ll spot a database of related “Errors,” “Warnings,” and “Notices.” 

Click connected the bluish nexus successful the contented statement for a afloat database of affected pages. Replace each nexus to a breached leafage with a nexus to different applicable page.

search for “internal” successful  Site Audit "Issues" tab

Set Up Recurring Redirect Audits

Set up recurring redirect audits to find and hole redirect issues rapidly and support your tract attraction manageable.

Broken links and pages tin harm your SEO. Redirecting is an casual mode to forestall antagonistic effects connected your rankings.

Luckily, redirects are elemental to instrumentality oregon hole erstwhile you tally audits regularly to drawback breached links early.

To docket automatic audits, click the cogwheel icon successful the top-right country of the Site Audit dashboard.

“settings” icon highlighted successful  the apical  close    of the Site Audit dashboard

Under “Site Audit settings,” scroll down and click “Schedule: Weekly, Every Tuesday.”

Site Audit Settings

Select your preferred time of the week from the drop-down successful the “Site Audit Settings” popup.

Check “Send an email each clip an audit is complete.”

And deed “Save.”

schedule however  often   should the instrumentality   audit your tract  successful  Site Audit Settings

Fix immoderate redirect issues connected your WordPress tract arsenic soon arsenic they appear. 

Redirect traffic—and leafage authority—to applicable pages that work. And springiness your site’s idiosyncratic acquisition and hunt rankings a boost.