I have drupal installed in a subdirecotry: www.example.com/drupal/
I installed gsitemap 5.x-1.2 and the site "www.example.com/drupal" successfully submitted and verified to google sitemap. The sitemap automatically submitted is: www.example.com/drupal/gsitemap/0 , however, google says there is error for this sitemap:
"URL not allowed
This url is not allowed for a Sitemap at this location.
URL http://www.example.com/drupal"

How to resolve this, and is it because my drupal is installed in a subdir? Thanks!

Comments

cmsproducer’s picture

This very issue has been discussed and solved several times on this forum and others. Here is an in-depth review of the issue subject: Submitting an XML sitemap to google and successfully configuring Drupal Gsitemap. You can also search drupal.org for more information on the module.
-----
iDonny Productions: Accessibility & Web Standards-based Design & Devt., CMS & Web Branding

dami’s picture

Thanks. So the solution would be create a gsitemap.xml pointing to gsitemap/ ?
I remember 4.7 version of gsitemap has the same setup (using gsitemap/) and didn't have any problem. Is it because google sitemap changed rules or it's a bug in the latest version of xmlsitemap module?

Phillip Mc’s picture

Hi Dami,

Did you work out how to get around this..I'm getting the same/similar error (from google Webmaster Tools)?

Phil

Edited: I'm going to try the solution linked in an earlier post and will report back up here if it works..i.e.

To solve the above-described problem, the most straight forward method is to create a URL alias within Drupal that names the gsitemap 'folder' with a secondary path that has a file extension so that it appears to be a file inthe root folder of your website/Drupal installation. For instance, creating an alias gsitemap.xml and pointing it to gsitemap will avail a sitemap for Google to download at www.example.com/gsitemap.xml Since this URL appears to point to a file in the root of your website (www.example.com/), Google will consider you to be compliant of the second rule (above). This will enable Google to follow your sitemap and improve the indexing speed of your website.

dami’s picture

Unfortunately, no ....
I tried setting up a url alias using drupal's path module, which points www.example.com/drupal/gsitemap.xml to www.example.com/drupal/gsitemap/0. I have also resubmitted this new gsitemap url (www.example.com/drupal/gsitemap.xml) to google. Still the same error:

Line 1: URL not allowed
This url is not allowed for a Sitemap at this location. www.exmple.com/drupal

Please let me know if you are able to solve this. Thanks!

Maticode’s picture

It must be in your root directory. www.example.com/gsitemap.xml

sohbetme’s picture

URL not allowed ! This message was opened to a variety of subjects, but could not see good enough answer. I could not find a logical answer. I think the problem from a given address into your robots.txt. If we are specifying the address of sitemaps in robots.txt. It could mean that the different addresses to check out.
Greetings..
by asiL