20
Redirects and Robots for Accurate Analytics Results

WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Embed Size (px)

Citation preview

Page 1: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Redirects and Robots for Accurate Analytics Results

Page 2: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Who is This Person?

Declan O’Neillwww.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.

Page 3: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Scenarios?

Solution to a Common Problem: 301 Redirects.

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.

Page 4: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

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 the new page.

…to show the new URL in the search results.

Page 5: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

.htaccess file 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.

Page 6: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Old vs. New URLs

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”

Old URL = www.yoursite.com/about-us.html

New WordPress URL = www.yoursite.com/about

Page 7: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

.htaccess is very powerful

Edit with Caution!

Page 8: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Tools for Editing your .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)

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.

Page 9: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Default WordPress .htaccess File

This is how your WordPress .htaccess file should look like before you edit it.

Page 10: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

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)

Page 11: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

.htaccess file with 301 Redirects

This is how your WordPress .htaccess file should look after you added the redirect.

Page 12: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

301 Redirect WordPress Plugins

Go to: Admin > Plugins > Install Plugins

URL = http://urbangiraffe.com/plugins/redirection/

Search for “301 Redirect”

Look for a plugin called “Redirection”

Page 13: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Adding a Page RedirectGo to: WordPress Admin -> Tools -> Redirection

Click “Add Redirection”

Add the old URL into the “Source URL” field.

Add the new URL into the “Target URL” field.

Page 14: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

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.

Page 15: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

What does Robots.txt File Look Like

http://wordpressannarbor.com/robots.txt

Page 16: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

How Do I Add a robot.txt File

You have two options:

1. FTP to Server

2. WordPress Plugin

Page 17: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

FTP robots.txt File to Server

Open Text editor -> Add Code -> Save File -> Open FTP Software -> Add File to Root Folder -> Upload

Page 18: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

robots.txt WordPress Plugin

Step 1. Install the PluginWP admin -> Install Plugins-> Search for “KB Robots.txt” -> Install Plugin

Step 2. Configure the PluginAdmin -> Settings -> KB Robots.txt -> Add your Robots Rules -> Click Submit

View the robots.txt http://wordpressannarbor.com/robots.txt

Page 19: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Next Talk

Anothony Montalbano

4 Tips on Deeper Google Analytics for WordPress

Page 20: WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

Thank You

Custom WordPress Web Design.

www.logicbydesign.com

@logicbydesign