SEO 总结
August 10, 2024 by
总结 SEO 常用内容:
- TDK
- opensearch.xml
- robots.txt
- sitemap.xml
- urllist.txt
- 图片
alt
属性 - 链接
rel=nofollow
属性 h
标签权重404
页面301
重定向302
重定向canonical
标签noindex
标签nofollow
标签noarchive
标签nosnippet
标签noodp
标签noydir
标签noimageindex
标签notranslate
标签
基础部分
TDK
<title>
标签<meta name="description" content="...">
标签, 包含页面url
<meta name="keywords" content="...">
标签
opensearch.xml
head 标签内
<link
rel="search"
type="application/opensearchdescription+xml"
title="Example.com"
href="/opensearch.xml"
>
opensearch.xml
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Example.com</ShortName>
<Description>Search Example.com</Description>
<Url type="text/html" template="https://example.com/search?q={searchTerms}"/>
</OpenSearchDescription>
robots.txt
head 标签内
<meta name="robots" content="index,follow">
robots.txt
User-agent: *
Allow: /
Disallow: /cgi-bin/
Disallow: /tmp/
Sitemap: https://example.com/sitemap.xml
sitemap.xml
参考: https://www.yesharris.com/seo-basic/sitemap-seo/
sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
>
<url>
<loc>https://example.com/news/1.html</loc>
<lastmod>2024-08-09T12:38:30.082Z</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<!-- ... -->
</urlset>
urllist.txt
这个都是 sitemap.xml
转换而来的, 用于提交给搜索引擎
urllist.txt
https://example.com/news/1.html
https://example.com/news/2.html
https://example.com/news/3.html
https://example.com/news/4.html
...