Browsing all articles in SEO
A good .htaccess file
I’m a bit new to this side of things but for now this is the .htaccess file I’m using when I want everything to point back to http://www.site.com/
RewriteEngine on
# Send index.php or index.html to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.(html?|php)(\?[^\ ]*)?\ HTTP/
RewriteRule ^(([^/]*/)*)index\.(html?|php)$ http://www.site.com/$1 [R=301,L]
# Force www
RewriteCond %{HTTP_HOST} !^www.site.com$
RewriteRule ^(.*)$ http://www.site.com/$1 [R=301]
# Force trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ http://www.site.com/$1/ [R=301,L]
Also I should have figured this out years ago but I shouldn’t just reference index.php and the like in an href, do it up right with the full URL http://www.site.com/
Converting a site to WP but doing the right SEO stuff
Mainly what you have to do is:
- Convert the site to WP
- Once all is good with WP edit .htaccess
- Above all the wordpress stuff you have to add this type of thing: Redirect 301 /myoldurl.html http://mydomain.com/newpagename
- You have to add that for each old file that you want to redirect to the new file
- There is info all over the net, including here: http://stackoverflow.com/questions/3696002/converting-a-static-site-to-a-wordpress-site-how-to-transfer-convert-seo-ranki
301 Redirect and Canonicalization
This is a bit web design related and a bit SEO related but basically watch this video:
Then check these sites on how to fix it.
http://knowledge.freshpromo.ca/seo-tools/301-redirect.php
http://www.barrywise.com/2008/10/seo-canonical-urls-and-301-redirects-in-windows-iis-6-iis-7/
http://www.searchenginepeople.com/blog/hwoto-canonical-headers.html
Recent Posts
- IE, Forms, Image Submit Buttons = Bad Mojo
- A good .htaccess file
- It’s the little things
- Converting a site to WP but doing the right SEO stuff
- 301 Redirect and Canonicalization
Categories
- Android
- Cookies
- CSS
- Droid 2
- FireFox
- General Nerdiness
- God
- HTML
- IE8
- Internet Explorer
- Introduction
- Javascript
- jQuery
- Mexico
- Photoshop
- PHP
- Random Thoughts
- SEO
- Spyware
- Virus
- Web Design
- Win7
- Wordpress
