Why is the XML sitemap rendered as a plain text in the Google Chrome browser?

Why is the XML sitemap rendered as a plain text in the Google Chrome browser?

When an XML sitemap includes hreflangs, it is displayed without CSS styles, which is considered the expected behavior. This can happen because the Google Chrome does not have a built-in viewer specifically designed for XML files like it does for HTML.

Here is an example of the sitemap configuration where hreflang tags are enabled: 



When opening the XML sitemap link, its content is displayed as a plain text as follows:



Even though, it is still possible to view the XML Sitemap with the CSS style applied by checking the source code of the page. To do so, you can follow these steps:

1. Right-click on the webpage you want to view the source code of.
2. In the context menu that appears, select “View Page Source” or “View Source” option. This will open a new tab or window displaying the HTML source code of the webpage.
3. Alternatively, you can also press the keyboard shortcut Ctrl+U (Command+Option+U on Mac) to quickly open the page source in most browsers.

Below, you may view the sitemap layout with the source code opened:




      • Related Articles

      • Is it possible to use custom XML file structure to import data?

        All Import modules provide the functionality of creating your own XML file via special XSLT editor: The XLS template configuration depends on the user requirements, however, below provided the example of the XLS template: <?xml version="1.0" ...
      • What's the difference between an HTML Sitemap and an XML Sitemap?

        The difference is that XML sitemaps are written for search engines and HTML sitemaps are written for users. 1. The XML sitemap is not displayed on the frontend. It is a .xml file that is located on the server. It contains links to all pages of your ...
      • What PageSpeed Insights metrics does Google Page Speed Optimizer cover?

        The Google Page Speed Optimizer extension is designed to optimize images and code, which can help to improve certain PageSpeed Insights metrics and enhance the overall website performance. Our extension guarantees up to 97% rating if the fast server ...
      • How to optimize JS with the Google Page Speed Optimizer extension?

        To optimize JS with the Google Page Speed Optimizer extension, please follow the steps below. Step 1. Transfer Magento to the Production mode. It can be done with the next command from the root Magento folder: php bin/magento deploy:mode:set ...
      • How to submit product feed to Google Merchant?

        Once the feed is created in the Magento, you can upload it to the Google Merchant, following these simple steps. 1. Create a feed in your personal Google Merchant account by navigating to Products and clicking Add Products. Select the option Add ...