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

avpaderno’s picture

Title: Configurable base_url? » Configurable base_url

I 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?

kmillecam’s picture

Hi 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.

avpaderno’s picture

Thanks for the reply. I was trying to understand better your case.

In your case, a configurable base URL would help.

kmillecam’s picture

I 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.

avpaderno’s picture

The code of Sitemap has been ported to the 6.x-2 branch. Both the branches work with the anonymous user, anyway.

dave reid’s picture

Assigned: Unassigned » dave reid
Status: Active » Fixed

Configurable base URL option has been added. See http://drupal.org/cvs?commit=213884.

stattler’s picture

If 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

imiksu’s picture

You 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.