Guide

Redirect a page in WordPress without a plugin

Add one line, Redirect 301, to the top of your site's .htaccess file. It works on most shared hosting, before WordPress even loads.

In short: a 301 redirect is a "moved for good" note pinned to an old address. Put it in .htaccess, the file your web server reads before WordPress starts, and every visitor, bookmark and search engine that asks for the old page gets sent to the new one.

A redirect (or 301 redirect) sends anyone who opens an old address to the new one, so old links, bookmarks and Google don't end at a 404 error ("Page not found"). You need one when you rename a page's address (its slug, the part after your domain), delete a page people still link to, or move from another website.

How soon: the same day you move or delete a page that people link to. Old pages in Google start sending visitors to a dead end straight away.

What WordPress already redirects for you

  • Posts, yes. Change a published post's slug and WordPress remembers the old one and sends visitors on with a 301. Same for media and most custom content types.
  • Pages, no. WordPress doesn't do this for Pages (or anything that can have a parent page). Renamed or moved Pages need a redirect from you.
  • Near misses, sometimes. If someone types an address that doesn't exist, WordPress tries to guess the post or page they meant from the start of the slug. Don't rely on it: it guesses, and can guess wrong.

Add a 301 redirect in .htaccess

This works if your host runs Apache or LiteSpeed, which most shared hosting with cPanel does. Both read a file called .htaccess in your site's main folder.

  1. Make a backup. Log in to your hosting account and open File Manager. Go to your site's main folder (often public_html, the one with wp-config.php in it). Files starting with a dot are often hidden: turn on Show Hidden Files in File Manager's settings. Download .htaccess to your computer before you change it.
  2. Open it to edit. You'll see a block that starts # BEGIN WordPress and ends # END WordPress. Don't type inside that block: WordPress rewrites it and your line would vanish.
  3. Add your line above # BEGIN WordPress, one line per old page:
    Redirect 301 /old-page/ https://yourwebsite.com/new-page/
    The old address is just the part after your domain, starting with a slash. The new one is the full address, starting with https://.
  4. Save, then test. Open the old address in a private (incognito) window. It should land on the new page. If the whole site shows a 500 error instead, put your backup back straight away (see 500 errors).
Page renamed
Redirect 301 /about-us/ https://yourwebsite.com/about/
Page deleted
Redirect 301 /summer-camp-2025/ https://yourwebsite.com/camps/ (send it to the closest page, not always the home page)
Old site's page
Redirect 301 /contact.html https://yourwebsite.com/contact/
  • Capitals count: /About/ and /about/ are different addresses.
  • It covers what's underneath too: a redirect for /blog/ also sends /blog/any-post/ on, with the rest of the address added to the end. Be careful with short old addresses.
  • Write 301. Leave the number out and you get a temporary 302, and Google keeps the old address.
  • Don't redirect a page to itself, or two pages to each other: the browser goes round in a loop ("Redirected you too many times").
  • Avoid cPanel's Redirects tool for this. cPanel puts its rules at the bottom of .htaccess, and its own help says some apps, WordPress among them, may ignore them there.

When you can't do it without a plugin

  • WordPress.com (hosted by WordPress.com itself): there's no .htaccess file. WordPress.com's own help suggests a redirect plugin, which you can install on its paid plans.
  • Hosts that run Nginx (many managed WordPress hosts): Nginx doesn't read .htaccess. Ask your host to add the redirect, or use their dashboard's redirect setting if they have one.
  • No access to your hosting account: send the message below to whoever has it.

Some guides suggest a few lines of PHP in your theme's functions.php instead. WordPress's redirect function makes a temporary 302 unless told otherwise, the code is lost if you change theme, and a typo there can take the site down. .htaccess, or a plugin, is safer.

Find the pages that need one

  • Link Check tests every link on a page and lists the ones that end at a missing page. Its whole-site check reads up to 10 pages and emails you one report.
  • After you add redirects, run it again. Links on your own pages that now pass through a redirect show as "Moved": they work, but edit them to point straight at the new address.
  • In Google Search Console, the Pages report lists old addresses Google tried that came back Not found (404).

Send this to your web person

Not sure what to say? Copy this into an email, add your website's address, and send it.

Hi,

Some old addresses on our WordPress site, [your website address], now show "Page not found". The broken ones are in this report: [the report's link].

Could you add a 301 redirect for each one to the page that replaced it (or the closest one)? If our host runs Apache or LiteSpeed, a line like this above "# BEGIN WordPress" in .htaccess does it:

Redirect 301 /old-page/ https://[yourwebsite.com]/new-page/

Please also update the links on our own pages so they go straight to the new addresses, and tell me what you changed.

Thanks

Facts checked on Oct 8, 2026.

PageKiwi Tips

Plain-English website tips by email, coming soon. Unsubscribe in one click.

  • The two dates that take a website offline, and how to never miss them
  • A three-minute accessibility check anyone can do
  • How to spot a fake "your domain is expiring" email

We email you a link to confirm first. Never sold or shared. What we keep · Past tips

Know someone this would help? Share it

Quick question

Did this guide help with your problem?