最近做了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>