Redirecting old pages in WordPress: a plugin or .htaccess

The short answer: when a page changes address or disappears, whoever saved it (and Google) lands on a 404. The remedy is a 301 redirect, which says “it moved here”. In WordPress you do it with a plugin (easier, with an error log) or with a line in .htaccess (lighter).

Which to choose

Route When it fits
WordPress itself When you change a post’s address (its “permalink”), WordPress redirects the old one to the new one by itself.
A redirection plugin Many pages, or whoever does not want to touch files. It also shows the 404s that appear, so you know what to redirect.
A line in .htaccess A few redirects, or a whole domain. Lighter, no plugin.
With an SEO plugin Some include a redirect manager. Use only one.
Where to point To the most similar page, not to the home page.

Step by step

1 Make the list: old address and new address of each page. Use the Search Console 404s to complete it: Crawl errors.
2 With a plugin, install it, open the redirect manager and add each pair (source, target, type 301).
3 With .htaccess, copy the file and put, before the “# BEGIN WordPress” block, one line per redirect: Redirect 301 /old-page/ https://your-domain.com/new-page/
4 Test each one: open the old address and confirm it ends on the new one, in one step. curl -I https://your-domain.com/old-page/ should say 301.
5 Save the permalinks again if WordPress seems not to obey: Permalinks and the 404.
Do not redirect everything to the home page and do not make chains. A redirect to the home page is treated as an error (“soft 404”) and a chain (A to B to C) is slow and loses strength. Point each old one straight to the final one. 301 redirects.
If the site ends in a redirect circle, see ERR_TOO_MANY_REDIRECTS. To redo the site without losing visits: Redesigning a website without losing your Google traffic.

Have a long list of addresses to redirect? Open a ticket with the list.

Open a support ticket

SEE ALSO

301 redirects when you change a page or a domain

How to redirect HTTP to HTTPS with .htaccess

WordPress permalinks and the 404 that follows

Redesigning a website without losing your Google traffic

ERR_TOO_MANY_REDIRECTS: when the site redirects in a circle

RECOMMENDED PRODUCT

WordPress hosting

One-click install, updates handled, and speed that holds up. from 321,75 MT/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?