Reputation: 19
I have created pages to get backlinks in a directory (p).
I have mentioned it in the robots.txt and sitemap.xml according to the code below, but after 3 months they have still not been indexed by Google :
robots.txt :
User-agent: *
Disallow: /dir1
Disallow: /dir2
Disallow: /dir3
Disallow: /dir4
Sitemap: https://example.com/sitemap.xml
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2024-12-01</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/p/</loc>
<lastmod>2024-12-01</lastmod>
<priority>0.8</priority>
</url>
</urlset>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2024-12-01</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/p/page1.html</loc>
<lastmod>2024-12-01</lastmod>
<priority>0.8</priority>
</url>
<url>
<loc>https://example.com/p/page2.html</loc>
<lastmod>2024-12-01</lastmod>
<priority>0.8</priority>
</url>
.
.
.
</urlset>
Upvotes: -1
Views: 56
Reputation: 67
XML sitemaps should include all valuable, indexable URLs and not (just) top-level subdirectory URLs: https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
However, search engines don't have to index your content; if they consider it low-quality then there's a good chance they won't index it.
Upvotes: 1