WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Favorite / Book Marked Pages.You just got a website redesign and you upgraded to a WordPress CMS / Blog to manage your website content.You are wondering why Google Analytics is showing so many users landing on error 404 pages.
  • Editing the .htaccess file is risky; sometimes, misuse of the file can create an internal server error and make your site completely inaccessible to visitors -- or even to yourself!The .htaccess file is only applicable to Apache Linux-based server configurations; it is not applicable to IIS Windows-based servers.
  • You will need to add your individual 301 redirects to the .htaccess file one line for each page.
  • WordPress has some Plugin OptionsGo to: Admin > Plugins > Install PluginsSearch for “301 Redirect”
  • Specifying where search engines should look for content in high-quality directories or files you can increase the ranking of your site, and is recommended by Google and all the search engines.Ref: http://codex.wordpress.org/Search_Engine_Optimization_for_WordPress
  • Uploading your robots.txt file directly to the server via FTPUsing a WordPress Plugin
  • Step 1 : Open a text editorStep 2: add your code to the file.Step 3: Save it as “robots.txt”Step 4: Open up your FTP softwareStep 5: Add the robots.txt file to the root folder of your website.Step 6: Upload the File to the server.
  • WordPress Ann Arbor: Redirects and Robots for Accurate Analytics Results

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