Step 1: Getting Started
In this example, I’m going to use a page I’ve recently updated on www.unthankschool.com. The site has just completed a redesign that has changed the URL structure of several pages, including the new ‘Creative Writing Courses’ section. To stop people visiting the old URL and finding a 404 page a redirect will be used.
Step 2: Finding Your .htaccess File
Step 3: Show Hidden Files
Step 4: Open the File
If you can’t find the file, you may need to create one. To do this simply make a blank file name ‘htaccess’ and add it to the top level of your site using your FTP program. Once it is uploaded change the filename to ‘.htaccess’ (the full stop is important!) and open as usual.
Step 6: Choosing the Right Redirect
This is a permanent redirect that tells Google that the original URL is no longer valid and has been moved to a new location. This is the best for SEO as the value of the old URL will be passed on to the new one.
This is a temporary redirect, meaning that it has been put in place for a limited amount of time. This is not as effective for SEO and should not be used unless you are certain that it is appropriate.
303, 304, 305 and 307 redirects
These codes are seldom used for most projects and we do not recommend using them. If you see them in your file though, it may be worth asking your developer or webmaster (if you have one) why they are there, and if they can be swapped for a 301.
Step 7: Writing the Redirect
Redirect 301 /courses.html
Now add the full path of the page you’d like to redirect to. In this case it is http://www.unthankschool.com/online-creative-writing-courses.html.
The full code is Redirect 301 /courses.html http://www.unthankschool.com/online-creative-writing-courses.html
To check the redirect is working you can use this tool here -http://www.internetofficer.com/seo-tool/redirect-check/.
Congratulations – you now have a working, SEO-friendly 301 redirect in place! Not too difficult, was it?