Google 支持 RFC 3986 中定义的网址。所有被这项标准定义为预留的字符都必须采用百分比编码。非预留 ASCII 字符可以保留未编码形式。此外,非 ASCII 范围内的字符应采用 UTF-8 编码。
尽可能在网址中使用易读的字词,而非冗长的 ID 编号。
建议:在网址中使用简单、说明性字词:
https://en.wikipedia.org/wiki/Aviation
建议:在网址中使用受众群体的语言(以及如适用的话,使用音译字词)。例如,如果您的受众群体使用德语搜索,请在网址中使用德语单词:
https://example.com/lebensmittel/pfefferminz
建议:酌情使用 UTF-8 编码。例如,以下示例对网址中的阿拉伯语字符使用 UTF-8 编码:
https://example.com/%D9%86%D8%B9%D9%86%D8%A7%D8%B9/%D8%A8%D9%82%D8%A7%D9%84%D8%A9
以下示例对网址中的中文字符使用 UTF-8 编码:
https://example.com/%E6%9D%82%E8%B4%A7/%E8%96%84%E8%8D%B7
以下示例对网址中的变音字符使用 UTF-8 编码:
https://example.com/gem%C3%BCse
以下示例对网址中的表情符号使用 UTF-8 编码:
https://example.com/%F0%9F%A6%99%E2%9C%A8
不建议:在网址中使用非 ASCII 字符:
https://example.com/نعناع
https://example.com/杂货/薄荷
https://example.com/gemüse
https://example.com/🦙✨
不建议:在网址中使用不易读的、冗长的 ID 编号:
https://example.com/index.php?id_sezione=360&sid=3a5ebc944f41daa6f849f730f1
请勿使用片段更改网页内容,因为 Google 通常不支持网址片段。如果您要使用 JavaScript 更改内容,请改为使用 History API。
不建议:使用网址片段:
https://example.com/#/potatoes
如果您的网站是多区域网站,请考虑使用一种便于对您的网站进行地理位置定位的网址结构。如要查看更多示例,了解如何处理网址结构,请参阅使用基于语言区域的网址。
建议:采用特定国家/地区网域:
https://example.de
建议:搭配 gTLD 采用特定国家/地区子目录:
https://example.com/de/
不妨考虑在网址中使用连字符来分隔字词。这样有助于用户和搜索引擎更轻松地识别网址中的概念。建议您在网址中使用连字符 (-
) 而非下划线 (_
)。
建议:使用连字符 (-
):
https://example.com/summer-clothing/filter?color-profile=dark-grey
不建议:使用下划线 (_
):
https://example.com/summer_clothing/filter?color_profile=dark_grey
不建议:将网址中的字词连接在一起。
https://example.com/greendress
指定网址参数时,请使用以下常见编码:使用等号 (=
) 分隔键值对,并使用和号 &
符号添加其他参数。如需在键值对中列出同一键的多个值,您可以使用与 IETF STD 66 LINK 不冲突的任何字符,例如逗号 (,
)。
建议:使用等号 (=
) 分隔键值对,并使用和号 (&
) 添加其他参数:
https://example.com/category?category=dresses&sort=low-to-high&sid=789
建议:使用逗号 (,
) 列出同一键的多个值,使用等号 (=
) 分隔键值对,并使用和号 (&
) 添加其他参数:
https://example.com/category?category=dresses&color=purple,pink,salmon&sort=low-to-high&sid=789
不推荐:使用冒号 :
分隔键值对,并使用大括号 [ ]
添加其他参数
https://example.com/category?[category:dresses][sort:price-low-to-high][sid:789]
不推荐:使用单个逗号 ,
分隔键值对,并使用双逗号 ,,
添加其他参数
https://example.com/category?category,dresses,,sort,lowtohigh,,sid,789
过于复杂的网址,特别是那些包含多个参数的网址,可能会给抓取工具带来麻烦,因为它们可能会产生大量不必要的网址,全都指向您网站上相同或相似的内容。Googlebot 可能会因此而消耗大量不必要的带宽,也可能无法将网站上的所有内容完整编入索引。
导致网址过多可能有多种原因,其中包括:
https://example.com/hotel-search-results.jsp?Ne=292&N=461
https://example.com/hotel-search-results.jsp?Ne=292&N=461+4294967240
https://example.com/hotel-search-results.jsp?Ne=292&N=461+4294967240+4294967270
https://example.com/results?search_type=search_videos&search_query=tpb&search_sort=relevance&search_category=25
https://example.com/search/noheaders?click=6EE2BF1AF6A3D705D5561B7C3564D9C2&clickPage=OPD+Product+Page&cat=79
https://example.com/discuss/showthread.php?referrerid=249406&threadid=535913
https://example.com/products/products.asp?N=200063&Ne=500955&ref=foo%2Cbar&Cn=Accessories.
https://example.com/calendar.php?d=13&m=8&y=2011
https://example.com/index.shtml/discuss/category/school/061121/html/interview/category/health/070223/html/category/business/070302/html/category/community/070413/html/FAQ.htm
若要避免网址结构可能导致的问题,建议您采取以下措施:
nofollow
属性。免费申请你的专属方案
Online Consulting