Closed (fixed)
Project:
XML sitemap
Version:
6.x-2.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
14 May 2009 at 01:17 UTC
Updated:
11 Dec 2012 at 10:06 UTC
I'm just wondering if it would make sense to allow the administrator to configure a base_url that's used in the xml sitemaps?
On my site, for example, http://community.example.com/... is the preferred base_url. However, since I'm authenticated when I generate the sitemap, the URLs in the sitemap are https://secure-community.example.com/...
Since our content is cached via servers in a content delivery network, the http:// links are the ones we would like search engines to propagate -- links to the https:// URLs would bring users to the origin server which would add unnecessary load to that system.
I may be missing some logic here but thought I would offer up the suggestion.
Thanks.
Comments
Comment #1
avpadernoI have a question for you; if you visit your site as authenticated user and then you log out, which web site do you see or you are redirected to? http://community.example.com, or https://secure-community.example.com?
Comment #2
kmillecam commentedHi Kiam,
If you log out of the site you are redirected to http://community.example.com and are served cached pages from the CDN -- by design.
Comment #3
avpadernoThanks for the reply. I was trying to understand better your case.
In your case, a configurable base URL would help.
Comment #4
kmillecam commentedI just read through webchick's thorough post about XML Sitemap and wondered if her observation that the SiteMap module does its work as user 0 (the anon user) would solve this problem?
Just a thought.
Comment #5
avpadernoThe code of Sitemap has been ported to the 6.x-2 branch. Both the branches work with the anonymous user, anyway.
Comment #6
dave reidConfigurable base URL option has been added. See http://drupal.org/cvs?commit=213884.
Comment #7
stattler commentedIf base url is not specified, the default is not being written in the generated sitemap.xml. I had to fill that field manually in order to get the base url included in the sitemap.
Comment #9
imiksuYou might be interested on this issue: #1863526: Allow administrators to set URI scheme, which contains a patch for generating URLs always with HTTP or HTTPS scheme.