Masoudi
Masoudi

Reputation: 19

problem with page indexing by sitemap or google search console?

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

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>

But if I request a URL to be indexed through Search Console, it will be indexed in less than a week. I have a problem here, I don't understand what the problem is with the sitemap (I have also introduced the sitemap to Search Console). Should I write all 3,000 URLs in the sitemap instead of the directory in the sitemap :
<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>

OR should I request these 3,000 URLs one by one in Search Console (Is there a way I can request all these 3,000 URLs at once in Search Console) ?

I appreciate your help, thank you.

Upvotes: -1

Views: 56

Answers (1)

Cmastris
Cmastris

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

Related Questions