最近做了2個網站因此記下過程中的一些新的。
一個完整切具有良好seo優化的網站應該具備以下模塊或者元素:
1.head部分
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
編碼格式 這個是一定要具備的,否則在一些中文頁面因爲編碼的不同出現亂碼情況
<title>移動電源,充電寶,蘋果iPhone配件_手機配件專業生產廠家 - 西諾電子</title>
首頁title標籤的編寫要與整個網站內容有很好的關聯性,符合整站的主要內容,如果關聯性不好,導致排名無法提高,同時也是浪費標題的作用。
2.body
儘量將js代碼提取放到head導入
避免直接給元素使用style 設置樣式
設置樣式時候體現層次感,可以多給樣式表添加通用樣式以供使用
添加a 元素 title 屬性,img 元素 alt 屬性
nofollow 是什麼意思?
我們知道,反向鏈接是Google PR值的主要計算指標。爲了添加反向鏈接,SEO作弊者在論壇和博客等大量發佈帶無關鏈接的內容。這些垃圾鏈接的存在給搜索引擎對網頁質量的評估造成一定程度的麻煩。nofollow 正是Google、Yahoo、MSN 爲了應對垃圾鏈接(Spam)引入的一個屬性,此屬性目前應該被廣泛採用。
如果A網頁上有一個鏈接指向B網頁,但A網頁給這個鏈接加上了 rel="nofollow" 標註,則搜索引擎不把A網頁計算入B網頁的反向鏈接。
nofollow 怎麼用?
如某博客上有垃圾評論:
<a href="http://www.example.com/">頂頂</a>
以下操作,即進行了 nofollow:
<a href="http://www.example.com/" rel="nofollow" >頂頂</a>
搜索引擎在計算PR值時,不會把這個鏈接計算在內。
關於 nofollow:
- 目前絕大多數的博客和建站系統都加上了nofollow 屬性。也就是說,在其他人的博客上留鏈接以獲得PR值的做法是徒勞的。(特別是名人的博客,基本都用了nofollow)
- 如果你擔心網站被垃圾鏈接侵擾,nofollow是一個非常好的“拉圾鏈接防火牆”。
- nofollow 並不代表搜索引擎不收錄那個鏈接,只是不計入反向鏈接而已。
以下這一點對 SEOer非常重要。
你可以爲站點的內部鏈接添加 nofollow。比如:聯繫我們、關於我們、隱私保護、公司簡介、網站後臺等的鏈接可以把它們nofollow 掉,這樣做,首頁的PR值就不會傳輸給他們。因爲,他們有太多的PR值顯然沒用。
引用http://www.seowhy.com/10_106_zh.html
3.foot
copyright版權信息
sitemap 網站地圖
統計代碼google 百度等隱藏域。
4.服務器
sitemap.xml/sitemap.html 網站地圖 可以有效的提升搜索引擎的收錄率
根據需求添加僞靜態
需要apache配置
- <span style="font-size:18px;">LoadModule rewrite_module modules/mod_rewrite.so</span>
.htaccess 文件
eg.
- <span style="font-size:18px;"># Helicon ISAPI_Rewrite configuration file
- # Version 3.1.0.73
- RewriteEngine On</span>
- <span style="font-size:18px;">#多域名指向 將test.cn 重定向 至 </span><a href="http://www.test.cnRewriteCond"><span style="font-size:18px;">www.test.cn
- RewriteCond</span></a><span style="font-size:18px;"> %{HTTP_HOST} ^test.cn$
- RewriteRule ^(.*)$ </span><a href="http://www.test.cn/$1"><span style="font-size:18px;">http://www.<span style="color:#000000;">test</span>.cn/$1</span></a><span style="font-size:18px;"> [R=301,L]
- RewriteBase /
- RewriteRule ^tags/(.*)/$ /tags.php?/$1
- RewriteRule ^tags$ /tags\.php
- RewriteRule ^tags\/(.*)-(.*)-(.*)-(.*)-(.*)$ /tags\.php?\/$1+$2+$3+$4+$5\/
- RewriteRule ^tags\/(.*)-(.*)-(.*)-(.*)$ /tags\.php?\/$1+$2+$3+$4\/
- RewriteRule ^tags\/(.*)-(.*)-(.*)$ /tags\.php?\/$1+$2+$3\/
- RewriteRule ^tags\/(.*)-(.*)$ /tags\.php?\/$1+$2\/
- RewriteRule ^tags\/(.*)$ /tags\.php?/$1
- </span>
robots.txt
- 如果你的站點對所有搜索引擎公開,則不用做這個文件或者robots.txt爲空就行。
-
一般情況下,robots.txt裏只寫着兩個函數:User-agent和 Disallow。
-
有幾個禁止,就得有幾個Disallow函數,並分行描述。
-
至少要有一個Disallow函數,如果都允許收錄,則寫: Disallow: ,如果都不允許收錄,則寫:Disallow: / (注:只是差一個斜杆)。
引用http://www.seowhy.com/45_14_zh.html
- <span style="font-size:18px;">User-agent: *
- Disallow: /plus/
- Disallow: /inclu
- Disallow: /templ
- Disallow: /data/
- Disallow: /images/
- Disallow: /include/
- Disallow: /logs/
- Disallow: /test/
- Disallow: /uploads/
- Sitemap: <a href="http://www.test.cn/sitemap.xmlSitemap">http://www.<span style="color:#000000;">test</span>.cn/sitemap.xml
- Sitemap</a>: <a href="http://www.test.cn/sitemap.html">http://www.<span style="color:#000000;">test</span>.cn/sitemap.html</a></span>