如何优化WordPress Robots.txt for SEO

Robots.txt是给机器人(这里指搜索引擎)看的,WordPress的Robots.txt是比较好创建,SEO也比较容易。很多插件有生成xml网站地图的功能,如果没有用插件,可以用WordPress自动的功能找到xml

如何优化WordPress Robots.txt for SEO
如何优化WordPress Robots.txt for SEO

首先在网站根目录创建 robots.txt,在里面加上以下内容。

User-Agent: *
Allow: /wp-content/uploads/
Disallow: /wp-content/plugins/
Disallow: /wp-admin/
Disallow: /readme.html
Disallow: /refer/
 
Sitemap: http://www.example.com/post-sitemap.xml
Sitemap: http://www.example.com/page-sitemap.xml

注意 Sitemap: 这一行写一条你的xml文件。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注