简体   繁体   中英

Create XML Sitemap with Query needed for auth

I am tasked with creating an xml sitemap for Web crawlers. The problem is that the only page that can be viewed is the home splash page unless you agree to the terms. Now there are Google analytics sending data from these pages already so Google is aware of them. I can get around a user needing to agree to terms by simply adding tos=true to a query string.

My question is, should I add all the pages to the sitemap with the query string so the robot can get to them? Or should I add the pages to the sitemap even though a robot will not be able to find these pages?

I have Google around and haven't really been able to find out of it is best practice to include or exclude pages that can't be immediately accessed by the crawler robot.

At first it felt like there is no need for a sitemap for us, but We definitely want and already have some analytics for pages that require auth , so I am kind of at a lose as to best practices in this situations.

You should add it with the query so the crawlers can find them, if you don't do it, then they can't acess your XML files and I guess what you are trying to accomplies is for the crawlers to access the XML files.

In my opinion, you should add the query, else I do not see a point for you to have the XML files at all if the crawlers can't access them.

In this link they are making queries and that is from sitemaps own website, also this link shows another important thing when working with sitemaps, and that is entity escapes. The crawlers only understand the links, if it's formatted correctly.

http://www.sitemaps.org/protocol.html#submit_robots

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM