UK web hosting · 24/7 live chat Open a ticket Client login

Guide

How to set up 301 redirects, step by step

By Limitless Hosting. Published 8 November 2026. Last updated 8 November 2026.

A 301 redirect is a permanent instruction that sends visitors and search engines from an old web address to a new one. You set it up in your hosting control panel, in a .htaccess file, or with a WordPress plugin. Use one whenever you change a page address, move to a new domain or merge pages, so you keep your visitors and most of your search ranking.

See the plans

How it works

What happens when someone visits an old address

  1. Visitor asksThey request /old-page/
  2. Server answers 301It says: moved permanently
  3. Browser followsIt requests /new-page/
  4. New page loadsVisitor sees the right content
  5. Search engine learnsIt updates its index over time

The basics

What a 301 redirect actually is

Every time a browser asks a server for a page, the server replies with a status code. A normal page returns 200, which means "here it is". A missing page returns 404. A 301 means "moved permanently": the content you wanted now lives at another address, and here is where to find it. Browsers follow it automatically, so the visitor usually notices nothing apart from a changed address bar.

The word "permanent" matters to search engines. It tells them to treat the new address as the real one, to show it in results and to carry over most of the old page's standing. A 302 redirect, by contrast, says the move is temporary, so search engines keep the old address in their index. Choosing the right one avoids confusing Google.

Redirects are not a trick. They are the polite, standard way to say that something has moved. Without them, anyone with a bookmark, an old link or a result in Google lands on an error page, and many will not try again.

Codes

Common redirect and status codes

CodeMeaningUse it when
200OK, page foundNormal pages
301Moved permanentlyAn address has changed for good
302Found, temporary moveA short-term redirect, such as a maintenance page
307 and 308Temporary and permanent redirects that keep the request methodTechnical cases such as form submissions
404Not foundThe page has gone and has no replacement
410GoneThe page was deliberately removed for good

Move your site without losing visitors

Free migration is included on Small and higher plans billed yearly.

See website migration

When to use one

Situations that call for a 301

You changed a page URL

If /services/plumbing/ becomes /plumbing/, redirect the old address to the new one.

You moved to a new domain

Redirect every old page to its matching page on the new domain. See moving a website.

You moved from HTTP to HTTPS

Send every HTTP address to its HTTPS twin. See HTTP to HTTPS.

You merged or removed pages

Send the old page to the closest useful replacement, not always the homepage.

You want one canonical version

Choose www or non-www and redirect the other to it.

You fixed a typo in a URL

Keep the old misspelt address working so existing links still land.

Method 1

Setting up redirects in your hosting control panel

The easiest method for most people is the redirects tool in the hosting control panel. You choose the type, which should be permanent (301), pick the domain, type the old path, such as /old-page/, and enter the full destination address. Save it, then test it by visiting the old address in a private browser window.

Control panel redirects are good for a handful of changes. They are easy to read and to remove later, and they do not need you to touch any code. If you find yourself adding dozens, a rule in .htaccess or a plugin with a spreadsheet import is more manageable.

Method 2

Setting up a 301 in the .htaccess file

Back up first

Download a copy of your existing .htaccess file. A single wrong character can take the whole site offline, and a copy lets you undo it.

Open the file

Use the file manager or SFTP to open the .htaccess file in your site's main folder. It is hidden by default, so enable hidden files.

Add a rule

For one page, add a line such as: Redirect 301 /old-page/ https://www.example.co.uk/new-page/

Save and upload

Save the file in plain text with no extra extension, and put it back in the same folder.

Test straight away

Visit the old address in a private window. Check you land on the new page and that the rest of the site still works.

Method 3

Redirects in WordPress

In WordPress, a redirect plugin gives you a friendly screen where you type the old and new addresses, and it can log 404 errors so you see which old links people are still using. Several SEO plugins also include a redirect manager. Choose one tool and stick to it, so you are not hunting through three places when something goes wrong.

WordPress also redirects by itself when you change a post's slug, in many cases, but do not rely on it for important pages. Add an explicit redirect if the old address ever had traffic or links. For bulk changes, such as a site redesign that renames dozens of pages, prepare a spreadsheet of old and new addresses first, and import it into the plugin.

Doing it well

Good and poor redirect habits

Good habits

  • Redirect each old page to the most relevant new page
  • Keep redirects in place for at least a year
  • Test every redirect after saving
  • Keep a list of what points where
  • Update internal links to the new address

Poor habits

  • Sending every old page to the homepage
  • Chaining one redirect into another into another
  • Creating loops where A leads to B and B back to A
  • Using 302 when the move is permanent
  • Deleting redirects after a few weeks

Troubleshooting

When a redirect does not work

SymptomLikely causeFix
Page still shows the old contentBrowser or cache holds the old copyTest in a private window and clear the cache
Browser says too many redirectsA loop, or www and HTTPS rules fightingRemove duplicate rules and test one at a time
Site shows a server error after editingA typo in .htaccessRestore your backed-up copy
Redirect works for some pages onlyA rule order problem or a missing trailing slashMatch the exact old path, including the slash
Search results still show old addressSearch engines take time to updateBe patient and submit the new sitemap

FAQ

Common questions

What is the difference between a 301 and a 302?

A 301 is permanent, so search engines move to the new address. A 302 is temporary, so they keep the old one.

Will a 301 redirect hurt my SEO?

Done correctly it keeps most of your search value. Mistakes such as loops, chains and redirecting everything to the homepage can hurt.

How long should I keep a redirect?

Keep it for at least a year, and longer if the old address still receives traffic or has external links.

Can I redirect a whole domain?

Yes. Redirect each old page to its matching page on the new domain, and the root domain to the new homepage.

Where is the .htaccess file?

It sits in your site's main folder and is hidden by default, so turn on hidden files in the file manager or SFTP client.

Move or rebuild your site with confidence

Free migration on Small and higher plans billed yearly, and live chat open 24/7.

See the plans .co.uk and .uk domains £9.99

From 84p a month, billed yearly
15-day money back
Get started