WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results
View more presentations from Declan ONeill.
WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results – Presentation Transcript
- Redirects and Robots for Accurate Analytics Results
- Who is This Person? Declan O’Neill - www.linkedin.com/in/declanon/ - Twitter @declanon
I’ve been working on websites since the mid-nineties, and working with WordPress since 2007.
I moved to the US in 2006 from Ireland.
I am an Account Manager for Logic by Design. - Scenarios?
Newly-Launched WordPress Website.
Google Analytics is showing results for error 404 pages.
If you renamed a WordPress Category.
If you renamed a WordPress Post or Page.
Solution to a Common Problem: 301 Redirects. - A 301 redirect tells the bots and user-agents:?
…that your page has been moved permanently.
…to bypass the old link in the future and go directly to thenew page.
…to show the new URL in the searchresults. - .htaccessfile among many other things:
…controls and overrides the Apache server configurations.
…provides security measures such as using passwords to restrict access.
…prevents hot linking (using images from your site).
…instructs your server to rewrite URLs.
…provides instructions to any redirection of URLs. - Old vs. New URLs
Old URL = www.yoursite.com/about-us.html
New WordPress URL = www.yoursite.com/about
Google already knows about “about-us.html” but it does not exist anymore. So you must create a way to redirect “/about-us.html” to “/about” - .htaccess is very powerful
Edit with Caution! - Tools for Editing your .htaccess File
You need access to the Server Files.
You need FTP software to down / upload the file.
You need a Text Editor to edit the .htaccess file.
FTP Software:
http://www.filezilla-project.org (Mac + PC) / http://fireftp.mozdev.org/ (Firefox Plugin)
Text Editing Software:
http://www.barebones.com/products/textwrangler/ (Mac) / http://www.pnotepad.org/ (PC) - Default WordPress .htaccess File
This is how your WordPress .htaccess file should look like before you edit it. - Adding 301 Redirects
Example: “redirect 301 /old.php http://www.url.com/new.php”
Let’s break it down:
redirect 301 (the instruction that the page has moved)
/old.php (the original path and file name)
http://www.url.com/new.php (new path and file name) - .htaccess file with 301 Redirects
This is how your WordPress .htaccess file should look after you added the redirect. - 301 Redirect WordPress Plugins
Go to: Admin > Plugins > Install Plugins
Search for “301 Redirect”
Look for a plugin called “Redirection”
URL = http://urbangiraffe.com/plugins/redirection/ - Adding a Page Redirect
Go to: WordPress Admin -> Tools -> Redirection
Add the old URL into the “Source URL” field.
Add the new URL into the “Target URL” field.
Click “Add Redirection” - Robots.txt
Search Engines read your “website.com/robots.txt” file to get information on what they should and should not be looking for and where to find those files. - What does Robots.txt File Look Like - http://wordpressannarbor.com/robots.txt
- How Do I Add a robot.txt File
You have two options: 1. FTP to Server / 2. WordPress Plugin - FTP robots.txt File to Server
Open Text editor -> Add Code -> Save File -> Open FTP Software -> Add File to Root Folder -> Upload - robots.txt WordPress Plugin
Step 1. Install the Plugin
WP admin -> Install Plugins-> Search for “KB Robots.txt” -> Install Plugin
Step 2. Configure the Plugin
Admin -> Settings -> KB Robots.txt -> Add your Robots Rules -> Click Submit
View the robots.txt http://wordpressannarbor.com/robots.txt - Next Talk. Anothony Montalbano 4 Tips on Deeper Google Analytics for WordPress
- Thank You. Custom WordPress Web Design. www.logicbydesign.com @logicbydesign













