1

My question is related to my previous question How to remove indexed pages from google effectively where I was advised to create XML sitemap and submit it to google. The advice looked solid so I created one.

Now when I created my custom sitemap and submitted to google, it did not pick any url of it and basically every url has error in it. I did replace &,',",(space) and other characters to properly url encode all the links but I am still getting the error. I did verify my sitemap from third party (xml-sitemap) and it reported no error. I want to know what am I doing wrong

enter image description here

enter image description here

Here is the sitemap snippet

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>
www.peshawar.co/search.php?keywords=&amp;city=peshawar
</loc>
<lastmod>2019-03-10</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>
www.peshawar.co/search.php?keywords=17%20Inquiry&amp;city=peshawar
</loc>
<lastmod>2019-03-10</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>
www.peshawar.co/search.php?keywords=3D%20Printers&amp;city=peshawar
</loc>
<lastmod>2019-03-10</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>

Here is the actual sitemap which contains 34k links and takes a while to download. Could it be the size of XML that is causing the problem? (Highly unlikely though)

1 Answer 1

1

Resolved. The issue was likely, the urls were missing http:// at the start, thus URLS were invalid. I have also added extra headers at the top.

enter image description here

Here is the final XML snippet

<?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://www.peshawar.co/search.php?keywords=asdfasd&amp;amp;city=peshawar</loc>

      <lastmod>2019-03-10</lastmod>

      <changefreq>weekly</changefreq>

      <priority>0.8</priority>

   </url>
   <url>

      <loc>https://www.peshawar.co/search.php?keywords=asdfasdf&amp;amp;city=peshawar</loc>

      <lastmod>2019-03-10</lastmod>

      <changefreq>weekly</changefreq>

      <priority>0.8</priority>

   </url>
1
  • 1
    Very strange format for a sitemap. A sitemap is to list the pages in the site, not a search. I hope this works for you.
    – Steve
    Commented Apr 9, 2019 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.