Today a facebook friend asked me for some unique seo tips, i said wait 15 min and ill pm you.
Well im not an seo guru but i know a bit.
This tips are not totally unique but its good to know them.
To view part 2: Unique seo tips part 2
Unique seo tips
frendly urls
There are few other tips:
url must be lowercase only, you can do this in php:
url must be lowercase only, you can do this in php:
<?php
$url = "All about SEO";
$url = strtolower($url);
?>
url must contain 4 words(best) or 5 separated with - and not _ or spaces.
No more than 3 directories
example:
http://localhost/article/mod-rewrite-tips.html (good ones with: - .html and less than 4 directories
http://localhost/article/php/2012/04/post.php?id=6 (bad one with more than 4 directories and bad url type)
http://localhost/article/mod_rewrite_tips.html (_ are not seo frendly)
Thats all you need to know for url's$url = "All about SEO";
$url = strtolower($url);
?>
url must contain 4 words(best) or 5 separated with - and not _ or spaces.
No more than 3 directories
example:
http://localhost/article/mod-rewrite-tips.html (good ones with: - .html and less than 4 directories
http://localhost/article/php/2012/04/post.php?id=6 (bad one with more than 4 directories and bad url type)
http://localhost/article/mod_rewrite_tips.html (_ are not seo frendly)
h b i tags
ok this is not unique but use them in this way:
<h1>Post title</h1> (if its an article)
if you are on pages like index.html sitemap.html about.html etc.. h1 header must be:
<h1>Site main keyword</h1> (like PHP Tutorials)
h2 must be used for second important titles
<b> and <i> (mostly <b>) must be used for main keywords like <b>seo unique tips</b> 2 or 3 times
post date is good for seo!
well when you search on google and get some crappy old content you start learning (at least i)
now when i search i use: 2011 php x x
and its not only me
if you do a google search for one of my site posts you will se date posted!
I did not included it on meta description(will be explained on part 2) but google was smart and included it :D
canonical stop dublicates
its an html tag used on head tags of the page:
<head>
<link rel="canonical" href="http://localhost/article/seo-tutorial.html">
http:// is used because my site uses http and not https or http://www
that takes to serious dublicate content
Make sure you use only one of those protocols.
This .htaccess rule redirect users who dont use your protocol:
Note: you must enable mod_rewrite.
# seo rule
# redirects http:// to http://www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^localhost[NC]
RewriteRule ^(.*)$ http://www.localhost/ $1 [L,R=301]
Redirect www to non www:
RewriteCond %{HTTP_HOST} ^ www.localhost [NC]
RewriteRule ^(.*)$ http://localhost/ $1 [L,R=301]
No comments:
Post a Comment