As SEO’s we’ve all been there before, you’re in the midst of launching a new version of your website and are then faced with the daunting task of implementing hundreds of 301 redirects to retain your organic search rankings. Any good SEO will agree that 301 redirects are necessary, also, any good SEO will agree that generating the .htaccess code to implement them is both time consuming and mind numbingly boring. As a result, I thought I would share the technique that I’ve been using for a number of years to speed up the whole process.
Step 1 – Map the old pages to the new using Excel
All the tools and tricks in the world won’t get you away from the fact that you’ll have to sit down and map all existing url’s to their new home and although time consuming it should be pretty straightforward. In Excel create two columns, one for old URL and one for new URL, for every old URL enter the new URL into the relevant column. Make sure that you using the full URL i.e. https://www.growtraffic.co.uk/internet-marketing/seo/freelance-search-engine-optimisation-seo-specialist. For example, a client that I work with (ICT Direct) is just in the process of launching a new website and here is the mapping:
Step 2 – Use 301 .htaccess formatting
Now that you’ve completed the mapping you then need to format your Excel document to use the correct 301 redirect code for your .htaccess file.
Firstly, select the first column in your spread sheet (the old URL) and replace the root domain with “redirect 301 “. For example ‘https://www.growtraffic.co.uk/internet-marketing’ would be replaced with ‘redirect 301 internet-marketing’. To due this press CTRL-H to perform a find and replace, the replace the root domain (including trailing slash) with ‘redirect 301 ‘ (note the space on the end): Secondly select both columns and paste then into a new Word document.
Step 3- Edit the columns in Word
When pasting into Word from Excel it will paste the data into a table.
The final thing we need to do is convert the table to text. To do this simply select the table and the under Table->Format, select ‘Convert to Text’, the select ‘Other’ for the separator and use a single space.
You’ll then want to change the table to text. Select the table, then under the Table/Format menu, select “Convert Table to Text” and select “Other” for the separator option. For other, use a single space.
Step 4- Add code to your .htaccess file
The final step is copy everything from your word document and paste it into the .htaccess file on your server and then you should have lots of lovely redirects that will help keep your organic search traffic in tact when you launch your new website.
Easing The Pain Of 301 Redirects With Excel
Or fill in the contact form page