Sitemap.xml reported as invalid by google

Hi there. I finally moved my website from wordpress to hugo. In a previous post issue with displayed posted was fixed. Now I have issue with sitemap.xml being reported as incorrect by google.

Here is my sitemap https://www.wojcieh.net/sitemap.xml. I guess google is complaining about the URL.s

I didn’t found any specific section in sitemap config.

Here is my config.toml

    baseurl = "https://www.wojcieh.net"
    title = "wojcieh.net"
    languageCode = "en-us"
    paginate = "10" # Number of posts per page
    theme = "wojcieh-net-mainroad"
    disqusShortname = "wojcieh-net" # Enable comments by entering your Disqus shortname
    googleAnalytics = "UA-XXXXXXX" # Enable Google Analytics by entering your tracking id

    [Author] # Used in authorbox
      name = "Wojciech Marusiak"
      bio = xxxxxx"

      avatar = "img/avatar.png"

    [permalinks]
    posts = "/:slug"
    pages = "/:slug"

    [params]
      mainSections = ["/"]

    [Params]
      #subtitle = "Just another site" # Subtitle of your site. Used in site header
      #description = "John Doe's Personal blog about everything" # Site description. Used in meta description
      #copyright = "John Doe" # copyright holder, otherwise will use site title
      opengraph = true # Enable OpenGraph if true
      twitter_cards = true # Enable Twitter Cards if true
      readmore = false # Show "Read more" button in list if true
      authorbox = true # Show authorbox at bottom of pages if true
      toc = false # Enable Table of Contents
      post_navigation = true # Show post navigation at bottom of pages if true
      post_meta = ["date", "categories", "translations"] # Order of post meta information
      #mainSections = ["post", "blog", "news"] # specify section pages to show on home page and the "Recent articles" widget
      #dateformat = "2006-01-02" # change the format of dates
      #mathjax = true # Enable MathJax
      #mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" # Specify MathJax path
      #mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config
      #highlightColor = "#e22d30" # Override highlight color
      customCSS = ["css/custom.css"] # Include custom CSS files
      customJS = ["js/custom.js"] # Include custom JS files

    [Params.sidebar]
      home = "right" # Configure layout for home page
      list = "left"  # Configure layout for list pages
      single = false # Configure layout for single pages
      # Enable widgets in given order
      widgets = ["veeam", "social", "recent", "categories", "languages"]

    [Params.widgets]
      recent_num = 10 # Set the number of articles in the "Recent articles" widget
      tags_counter = true # Enable counter for each tag in "Tags" widget (disabled by default)

    [Params.widgets.social]
      # Enable parts of social widget
      facebook = "wojciehnet"
      twitter = "wojciehnet"
      #instagram = "username"
      linkedin = "wojciechmarusiak"
      #telegram = "username"
      github = "wojciehm"
      gitlab = "wojcieh"
      #bitbucket = "username"
      #email = "example@example.com"

    [privacy]
      [privacy.disqus]
    disable = true
      [privacy.googleAnalytics]
    anonymizeIP = true
    disable = false
    respectDoNotTrack = true
    useSessionStorage = false
      [privacy.instagram]
    disable = false
    simple = false
      [privacy.twitter]
    disable = false
    enableDNT = true
    simple = false
      [privacy.vimeo]
    disable = false
    simple = false
      [privacy.youtube]
    disable = false
    privacyEnhanced = true

Do you have a special sitemap template? If so post it.
The error message looks like you have relative links in your sitemap. like /something/ instead of http://domain.ext/something/

1 Like

Thanks for the answer. What do you mean if I have sitemap template? How can I get/set one?

If there is a /layouts/sitemap.xml or /themes/yourtheme/layouts/sitemap.xml file then this is the sitemap template :slight_smile:

3 Likes

Thanks a lot mate. Indeed sitemap.xml was missing in layouts. Once added google no longer complains about it.