Sitemap set-up for multi-domain sites

Some sites require the use of multiple domains. Perhaps you have legacy sites that are redirecting to your SiteFarm site. Maybe you have a couple of vanity URLs to create short, snappy pathways to specific pages deeper in your site involving campaigns or high-profile content. Your department may be part of an interdisciplinary group that needs to be identified with multiple domain spaces.

Whatever example best fits your use case, you'll want to set a single, definitive URL to be used in your sitemap.xml file to assist with SEO results and user experience.

If you're only using one domain for your site, or the vanity URLs are within the same namespace, you won't need to make any changes.

Configure your preferred Sitemap.xml domain

  1. Navigate to Manage » Configuration » SiteFarm section » Simple XML Sitemap Settings.
  2. In the text field provided, enter your preferred default domain. URLs should be written as:
    https://yourdomain.ucdavis.edu or https://www.yourdomain.ucdavis.edu
  3. Click the Save configuration button to finish.
  4. Check that your change has been implemented by going to your URL bar in your browser and changing the pathway to:
    yourdomain.ucdavis.edu/sitemap.xml.
  5. When you do so, you should this at the top of the .xml page:
<!-- Generated by the Simple XML Sitemap Drupal module: https://drupal.org/project/simple_sitemap. -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://yourdomain.ucdavis.edu/</loc>