back to top
shopping basket

View your basket

Negative scanning service

What our customers are saying:

thank-you for the brilliant outcome of the DVD's, they were a really great gift and my Mum was thrilled with them!

Read more...

301 Re-directs to Improve SEO

301 Re-directs to Improve SEO

PiciScan Web Design Blog RSS Feed

Posted on: Thursday, 19 February 2015

If you're not making use of Google's Webmaster Tools, you should be. It comes with a whole variety of useful functions, not least of which are the Crawl Errors that Googlebot encounters as it crawls your website. Sometimes, these will come up as 404 errors, because it has followed a link found somewhere else, ended up on your website and not found the expected page.

But, what should you do about them? Google itself says that 404 links don't necessarily harm your SEO, but does add that it can harm the user experience. A user may land on your Custom 404 error page and, because they haven't found exactly what they were looking for, leave immediately. And, more annoyingly, the link they followed might have been inaccurate anyway! This is where 301 re-directs can help.

Start by creating a new php file in whatever your software of choice is. Use Webmaster Tools to find out the name of one of the 404 error links and rename this blank php file to match. Then, work out where the link was trying to navigate to (In our case, there exists somewhere on the web a link to "piciscan.co.uk/slide-scanningA", so this one was quite easy: the target was supposed to have been the slide scanning services page on our website). With this information to hand, you are ready to edit the php file.

Add in the basics to create a new html document:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>

Then, between the <body> tags, add the following:

<? Header("HTTP/1.1 301 Moved Permanently");
Header("Location: http://mydomain.com/intended-target-page");
?>

The php file is now nearly ready to be saved and uploaded to the root folder of your site, in our case, the "httpdocs" folder. But, as this file hasn't really got much in it, it doesn't need to be indexed or crawled by Googlebot, so it needs a little bit of code between the <head> tags:

<meta name="robots" content="noindex">

In full, your new php file will look like this:

<!DOCTYPE html>
<html>
<head>
<meta name="robots" content="noindex">
</head>
<body>
<?Header("HTTP/1.1 301 Moved Permanently");
Header("Location: http://mydomain.com/intended-target-page");
?></body>
</html>

If you decide to copy and paste the above into your new php file, then don't forget to change, "mydomain.com" for the address of your site and "/intended-target-page" for the name of where the 404 link was trying to reach.

Mark founded PiciScan in 2010, and sold it in October 2015 to Web By Numbers Ltd, who now employ him! He likes Star Wars, playing escape games and looking after his bonsai tree.

comments powered by Disqus

The Latest From our Scanning Blog

Christmas 2015

Christmas 2015

Posted: 14 December 2015

It’s nearly the time of year to be going up into the loft and bringing down all the Christmas decorations, locating the tree and seeing if those lights from last year still work, or if you need to buy any more...

Read more

The Latest From our Web Design Blog

Box Sizing: Border-Box

Box Sizing: Border-Box

Posted: 24 March 2016

I first came across box-sizing: border-box when it cropped up in a temporary colleague's CSS. I found it pretty annoying when I picked up work that he'd started as it seemed to get in the way. This was because, as I said in a previous post on margin ...

Read more