Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Moved to Fixing WordPress, this is not an Everything else WordPress topic.
What plugin are you using to generate that sitemap_index.xml?
Show source page.
<html>
<title>Convoy Security Group</title>
<head>
<meta name="description" content="Convoy Security Group, one of the first VTC's in TruckersMP with already 5 years experience!">
<meta name="keywords" content="Convoy Security Group,ConSecGroup,CSG,VTC,TruckersMP,Convoy">
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//yourdomain/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://yourdomain/post-sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://yourdomain/page-sitemap.xml</loc>
<lastmod>2019-12-09T12:38:39+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://yourdomain/oceanwp_library-sitemap.xml</loc>
<lastmod>2019-11-19T09:31:26+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://yourdomain/ocean_portfolio-sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://yourdomain/author-sitemap.xml</loc>
<lastmod>2019-12-08T18:23:28+00:00</lastmod>
</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->
A well formed xml file start with xml declaration.
I’m using: Yoast SEO. (but already tried multiple plugins, and none of them worked).
(autotutorial: there is one before the first sitemap element. (<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">)
-
This reply was modified 6 years, 5 months ago by
rubenio1.
-
This reply was modified 6 years, 5 months ago by
rubenio1.
https://en.wikipedia.org/wiki/Well-formed_document
You can’t mix html markup with xml, you need to find which plugin adds html markup to an xml file.
means an xml file must not start with html markup and optionally can have an xml declaration on the first line.
Do you think that it is another plugin which automatically adds that to every file? Or that the 2 plugins are coded wrong (which would be weird because it are 2 plugins with over 2 million downloads (there’re well known to say at least). @autotutorial
yes, I think a plugin other than yoast Seo adds html markup to everything.
Example of xml and declaratiion, well formed.
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//yourdomain/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://yourdomain/post-sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://yourdomain/page-sitemap.xml</loc>
<lastmod>2019-12-09T12:38:39+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://yourdomain/oceanwp_library-sitemap.xml</loc>
<lastmod>2019-11-19T09:31:26+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://yourdomain/ocean_portfolio-sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://yourdomain/author-sitemap.xml</loc>
<lastmod>2019-12-08T18:23:28+00:00</lastmod>
</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->