How to create a Google sitemap.xml using MySource Matrix

The following steps detail how to make a sitemap.xml using MySource Matrix that is compatible with search engines such as Google.

The process involves creating a design and asset listing page.

Please note that if your website contains a lot of pages the asset listing process may be resource intensive and may take a few seconds to load.

Step 1: creating the design

  1. Right-click on where you want to create the design, choose ‘New Child’ -> ‘Design’ then ‘Design’
  2. MySourceMatrix-Sitemap1
  3. Under ‘Design Name’ enter Sitemap and click ‘Apply’ (you may choose another name)
  4. Right-click on the sitemap design and choose ‘Edit Parse File’
  5. MySourceMatrix-Sitemap2
  6. Acquire the lock and paste in the following code
  7. <MySource_PRINT id_name="__global__" var="content_type" content_type="text/xml" />
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <MySource_area id_name="body" design_area="body" /></urlset>
    
  8. Apply the changes.
  9. Open the ‘Details’ screen for the design and ‘Approve and Make Live’.

Step 1: creating the assist listing

  1. At the top level of your website, right-click and choose ‘New Child’ -> ‘Pages’ then ‘Asset Listing Page’
  2. MySourceMatrix-Sitemap3
  3. Under ‘Page Name’ enter sitemap.xml – it is important that this is the name entered, this is the recognised standard name for a website sitemap.
  4. Click ‘Apply’ to create the asset listing.
  5. Open the ‘Details’ screen, acquire the lock and choose what types of files and pages you want to be included, for example ‘Standard Page’ and ‘Assist Listing Page’
  6. Under ‘Asset Statuses to List’ choose ‘Live’
  7. Under ‘Exclude This Asset’ choose ‘Yes’
  8. Under ‘Root Nodes’ choose the top level of your website.
  9. From here you may also choose assets to exclude
  10. MySourceMatrix-Sitemap4
  11. Apply the changes
  12. Expand sitemap.xml, and then expand ‘Type Formats’
  13. Right-click on ‘Default Format’ and choose ‘Edit Contents’
  14. MySourceMatrix-Sitemap5
  15. Click on the orange edit properties icon then change ‘Presentation’ and ‘Content Type’ to ‘Raw HTML’
  16. Click ‘Apply’
  17. Replace the content with the code below
  18. <url>
    <loc>%asset_url%</loc>
    <lastmod>%asset_updated_short%</lastmod>
    </url>
  19. Click ‘Apply’ to save the changes
  20. Right-click on ‘Page Contents’ and choose ‘Edit Contents’
  21. Click on the orange edit properties icon then change ‘Presentation’ and ‘Content Type’ to ‘Raw HTML’
  22. Click ‘Apply’
  23. Open the ‘Details’ screen for the design and ‘Approve and Make Live’.

 

Step 3: Apply the design to the asset listing page

  1. Right-click on the sitemap.xml asset listing page and select ‘Settings’
  2. Acquire the lock
  3. In the ‘Designs’ section, under ‘System Defined Frontend Design’, use Override’ to select the design created earlier
  4. Apply the changes.

Step 4: Test!

The sitemap.xml should now load using the address of www.yourdomain.com/sitemap.xml

You should now open it and check if it is including everything you need, and make sure it’s not including stuff you dont want – such as folders that you dont want Google to index.

You can go back to the asset listing details page to customise what is and is not included.