Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Technical SEO: .htaccess & 301 Redirects


Published on

Rob Bertholf, #1 ranked "Search Engine Optimization Expert" in Google discusses the HTACCESS file and how to create 301 redirects for your website.

Published in: Marketing
  • Be the first to comment

Technical SEO: .htaccess & 301 Redirects

  1. 1. Technical SEO: HTACCESS File @Rob Bertholf
  2. 2. Geek Cred Google Search Engine Optimization Expert @Rob Bertholf | Search Engine Optimization Expert Hi, I’m @Rob on Twitter. California guy living in Honolulu, Hawaii the last 10 years. I teach at University of Hawaii’s PNM program and I am passionate about Development, Social Marketing Strategy, Web Analytics & Conversion optimization. Search engine optimization - Wikipedia About 22,500,000 Results #1 in
  3. 3. What is HTACCESS? .htaccess files (or “distributed configuration files”) provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof. - via Apache
  4. 4. What is HTACCESS? The file you edit to manage redirects (and how page paths are handled).
  5. 5. Vocabulary ● File Transfer Protocol (FTP): You will need to use an FTP program (Such as FileZilla) to access your web server. ● Uniform Resource Locator (URL): This is just a long name for your page path (e.g. /mypage.html) (*For geeks out there more, I know it is technically a URI but I am trying to simplify this with more common terms) ● 404: This is the server response code for “Not Found” ● 301: This is the server response code for “Permanent Redirect”
  6. 6. Other Types of Redirects Note: There are other ways to redirect pages using Javascrip, ASP, PHP, etc. THESE ARE NOT RECOMMENDED! They feel spammy to the search engines. Use 301 Redirects in your HTACCESS file (If on Apache).
  7. 7. Reasons for Redirecting Pages
  8. 8. Fixing Broken Link on Website /old-page.html /new-page/ 404 Error Add to your .htaccess file: Redirect 301 /old-page.html
  9. 9. Redirecting to or from http://WWW. WWW. Add to your .htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} !^$ [NC] RewriteRule ^(.*)$$1 [R=301,L]
  10. 10. Redirecting to new domain Add to your .htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} ^$ [NC] RewriteRule ^(.*)$$1 [R=301,L]
  11. 11. WordPress Rewrites index.php?id=2 /my-path/ Add to your .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
  12. 12. Editing your HTACCESS file
  13. 13. Prerequisite: File Transfer Protocol (FTP) Learn how to use FTP before expecting to edit your HTACCESS file.
  14. 14. Find or Create the File You will want to edit it with a plain text editor (notepad or similar, I like “Sublime Text” editor). If the file is not there you can create one. Just name it: “.htaccess”
  15. 15. WordPress “Redirection” Plugin If you are using WordPress you can use a plugin to manage your redirects. This is not as powerful but is easier to use.
  16. 16. Website Redesign Cleanup
  17. 17. 1. Finding Missing Pages In Google just type “” to return a list of pages in your website that Google has in their index. Google Search
  18. 18. 2. Add 301 Redirects Redirect old page to new page: 301 Redirect /old-page/ /new-page/ For obsolete pages just redirect to homepage: 301 Redirect /obsolete-page/ /
  19. 19. Also learn about: Google Webmaster Tools Learn about Google (and Bing’s) Webmaster Tools to optimize your site.
  20. 20. Found this useful? Tell me! Please tweet: “.@Rob, just saw the #HTACCESS #SEO tutorial and though it was _________”.
  21. 21. Aloha! @Rob