问题原文
原帖链接 · provance · CC BY-SA 4.0
Can I have only homepage URL inside sitemap.xml?
I want to cancel Google to crowling and indexing any other page.
here is the code of my current sitemap.xml:
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://gpj.rs/</loc>
<lastmod>2022-09-24T07:00:53+00:00</lastmod>
</url>
</urlset>
已采纳解答
原帖链接 · Stephen Ostermiller · CC BY-SA 4.0
Google doesn't limit crawling to just the URLs you put in your XML sitemap. Sitemaps are only one source of crawling data. Googlebot also crawls URLs when it finds links to them. If your home page contains links to other pages, Googlebot will find those other pages and crawl them whether or not they are in the sitemap.
Furthermore, once Googlebot crawls a URL, it will remember it forever. It will continue come back and fetch that URL periodically, even a decade or more after the content has been removed from it. Removing a page from your sitemap won't stop Googlebot from crawling or indexing the page.
Having Google index only your home page is a horrible SEO strategy. Most sites get only a small fraction of their search engine traffic coming into their home page. Google directs the majority of searchers deep into sites to specific content that matches the keywords they search for. If your goal is to get visitors from search engines, you should let Googlebot crawl and index all the content that would be relevant to searchers.
If you want Googlebot to stop crawling URLs, you need to list them in robots.txt with a Disallow: rule. However, that won't completely stop Google from indexing the pages. Google occasionally indexes pages that are blocked in robots.txt when it finds enough external links to them.
If you totally want the pages removed from Google, you should allow them to be crawled by Googlebot, but show an error, or explicitly tell Google not to index them using a robots meta tag.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
