网址URL
- 使用https协议
google
推荐使用更安全的https
协议。- 将
http
协议301
至https
协议;这种方式会短时影响流量,不过会慢慢恢复。最好还是直接更改调用点为https。
- 使用规范的http状态码
- 推荐使用
200
、301
、404
等规范状态码,避免使用自定义状态码,不便于蜘蛛理解。
- 推荐使用
- 保持简单的url结构
- 避免
url
过长、目录层级过深。
www.haodf.com/index 要优于 www.haodf.com/home/page1/… - 避免
url
携带过多参数,参数值要尽量短小。
www.haodf.com/index 要优于 www.haodf.com/index?id=12… - 必要情况下,考虑在网址中使用标点符号(推荐使用连字符-而非下划线_)。
推荐:www.haodf.com/green-dress…
不推荐:www.haodf.com/green_dress… - 避免
url
的大小写问题,最好统一使用小写url
。
- 避免
- 应以
.html
结尾- 规范
url
应以.html
结尾,.html
结尾的页面更容易被搜索引擎收录,增强网站的曝光率。 - 推荐:m.haodf.com/doctor/1117…
- 不推荐:m.haodf.com/doctor/1117…
- 规范
- 避免使用相对地址。
google
不推荐页面中使用相对地址,最好都是绝对地址。
- 做好网址映射。
-
使用
alternate
标签适配。<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.haodf.com/hospital/1.html">
-
当出现多个url指向同一页面时,使用
canonical
标签,解决内容重复的收录,导致被降权等问题。// 两种情况需要使用 canonical 标签 // 1.网站进行了改版,将旧的内容搬到了新的URL链接上,但是没有做301重定向。 // 2.一种是动态页面,一种是伪静态页面,但是内容都是一样的。 // 使用 <link rel=”canonical”href=”你的网页权威链接”/> // 示例 <link rel="canonical" href="<https://www.haodf.com/>">
-
- 避免过多使用重定向。
google
推荐3个以内的为最佳,最多不超过5个。- 但实际效果是最好一个都不要有。
网页语义化标签规范
- 网页
DOCTYPE
声明 - 页面
head
部分- 页面head主要包括页面编码、TDK、一系列meta适配标签、css、script标签
- 页面语义化标签结构
jsonld
数据-
jsonld
数据能够大大的帮助蜘蛛更好的理解页面结构和页面内容。有面包屑的页面,都需要添加面包屑的jsonld
。<!-- jsonld数据 --> <!-- 面包屑jsonld数据 --> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Books", "item": "https://example.com/books" },{ "@type": "ListItem", "position": 2, "name": "Science Fiction", "item": "https://example.com/books/sciencefiction" },{ "@type": "ListItem", "position": 3, "name": "Award Winners" }] } </script> <!-- 医生个人信息jsonld数据 --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Person", "name": "ma lei", "disambiguatingDescription": "41st President of the United States", "children": { "@type": "Person", "name": "George W. Bush", "disambiguatingDescription": "43rd President of the United States" } } </script> <!-- /jsonld数据 -->
-