How to fix xml sitemap error by yoast SEO
How to fix xml sitemap error by yoast SEO

Error codes

Error 404 page not found
Introduction
I was involved in xml sitemap error by wordpress using the SEO plugin by yoast I was trying to find the solution over the different forums and posts but I couldn’t fix the problem, I felt like banging my head on the wall for not finding the solution to the problem. Finally I discovered the solution to this particular problem and thought to share my experience with all of you who are actually experiencing this annoying situation.
Identified problems and solutions
Many people have looked into it in their own perspective and proposed different solutions.
Some people said it is the problem with the SEO by yoast plugin and you have to edit the plugin’s file and provided some additional rewriting codes to put in plugin’s htaccess file in order to get it fixed and generate sitemap for you Some people suggested turning on and off the plugin will fix the problem.
Some said your theme is poorly coded because of that you are getting that kind of error. Moreover, there were many different opinions and proposed solutions which may have worked well for some people but none for me.
The real problem
In many forums I have came across the argument that the real issue is with one or more of the plugins that you have installed in your wordpress, some of the plugins may create white blank space after opening So that was the real problem in my case.
How did I find the problem?
Once I took this suggestion that the problem is being caused by one of the plugins that I have installed on my wordpress I thought to analyse it thoroughly step by step to find out where the problem lies.
Step 1
I turned off-deactivated each and every plugin that was installed on my wordpress except SEO by yoast and then generated the sitemap and boom. The sitemap was generated without any problem. This way I figured out that there is nothing wrong with SEO by yoast neither with my worddpress theme coding rather there is definitely something wrong with one of the plugins that I have installed.
Step 2
Now that I have figured out the real problem is with one of the plugins, in the next step I started reactivating the plugins one by one to figure out which one is causing problem. I activated first plugin and regenerated sitemap it was ok. Then I activated second plugin and regenerated sitemap, all perfect. Then I turned on third Email subscriber plugin and regenerated sitemap, got stuck again that error 404 or line 2 column 6 error was found. Then I deactivated back my email subscriber plugin and checked other plugins that were left to see if anymore plugins have the same problem or not. But none of the others were causing the issue. This way I came to the conclusion that there is only one plugin that has to be fixed.
Step 3
Now all of the other plugins were activated except my email subscriber and there was no issue in generating sitemaps using SEO by yoast.
Comments
Post a Comment