Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Cómo corregir el error 404 del mapa del sitio de WordPress SEO de Yoast

Nota editorial: Ganamos una comisión de los enlaces de socios en WPBeginner. Las comisiones no afectan a las opiniones o evaluaciones de nuestros editores. Más información sobre Proceso editorial.

¿Estás intentando corregir el error 404 del mapa del sitio de Yoast SEO en WordPress?

Yoast SEO es uno de los plugins SEO más populares para WordPress. Debido a un conflicto de plugins o ajustes incorrectos de WordPress, puede mostrar un error 404 cuando intenta visitar su mapa del sitio XML.

En este artículo, le mostraremos cómo corregir fácilmente el error 404 del mapa del sitio XML de Yoast SEO en WordPress.

Fixing Yoast SEO XML sitemap 404 error in WordPress

¿Cuál es la causa del error 404 del mapa del sitio de Yoast SEO en WordPress?

El mapa del sitio de Yoast SEO ayuda a los motores de búsqueda a encontrar todo el contenido de su sitio web que desea que encuentren e indexen.

Corregir el error garantiza que los motores de búsqueda puedan acceder a su mapa del sitio y descubrir todas las páginas y contenidos de su sitio, lo que puede mejorar la visibilidad y la clasificación en los motores de búsqueda. Esto también ayudará a clasificar su contenido más rápido que sin un mapa del sitio.

WordPress incluye un mapa del sitio XML por defecto que puede enviar a Google Search Console y a otros motores de búsqueda.

Este mapa del sitio XML puede visitarse introduciendo la siguiente URL en la barra de direcciones de su navegador / explorador.

https://example.com/sitemap.xml

Sin embargo, este mapa del sitio generado por defecto por WordPress es muy básico. Para corregir esto, todos los mejores plugins de SEO para WordPress como All in One SEO para WordPress o el plugin Yoast SEO crean sus propios mapas del sitio XML con más características.

Cuando utiliza el mapa del sitio XML generado por su plugin SEO para WordPress, estos plugins reescriben el atajo del mapa del sitio XML por defecto de WordPress.

Esto significa que la URL del mapa del sitio mencionada anteriormente ahora enviará a los usuarios a los mapas del sitio generados por su plugin SEO para WordPress.

Desafortunadamente, esto puede causar un error 404 en algunos sitios web debido a conflictos entre plugins o ajustes incorrectos de WordPress.

Dicho esto, echemos un vistazo a cómo corregir fácilmente el error 404 del mapa del sitio de WordPress en el plugin Yoast SEO.

1. Actualizar WordPress Enlace permanente Estructura

WordPress viene con una estructura de URL SEO-friendly (también llamada permalinks). Esta estructura de URL utiliza un sistema de redirección para indicar al servidor de alojamiento web qué página debe cargar cuando un usuario introduce una URL en su navegador / explorador.

Normalmente, estos ajustes de enlaces permanentes se actualizan automáticamente cuando realiza cambios en su sitio web.

Sin embargo, a veces WordPress puede no ser capaz de actualizar la estructura de enlaces permanentes, lo que puede provocar que aparezca el error 404 del mapa del sitio de Yoast SEO.

Esto se puede corregir fácilmente visitando la página Ajustes ” Enlaces permanentes en el área de administrador de WordPress y simplemente haciendo clic en el botón “Guardar cambios”.

Update permalinks

Al hacerlo, se actualizarán los ajustes de los enlaces permanentes de WordPress. Ahora puede visitar su página de mapa del sitio XML para ver si esto ha corregido su problema.

Si no se ha corregido el problema, puede seguir leyendo.

2. Actualización manual de Enlaces permanentes

Si al actualizar la estructura de enlaces permanentes de WordPress no se corrige el error 404, puede indicar manualmente a su servidor web que redirija a los usuarios a la página del mapa del sitio de Yoast SEO.

Para ello, deberá añadir el siguiente código a su archivo .htaccess.

# Yoast SEO - XML Sitemap Rewrite Fix
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?yoast-sitemap-xsl=$1 [L]
# END Yoast SEO - XML Sitemap Rewrite Fix

Nota: Si su sitio web WordPress está instalado en un subdirectorio o carpeta (por ejemplo, https://example.com/mywebsite/ ), deberá utilizar el siguiente código.

# Yoast SEO - XML Sitemap Rewrite Fix
RewriteEngine On
RewriteBase /mywebsite/
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?yoast-sitemap-xsl=$1 [L]
# END Yoast SEO - XML Sitemap Rewrite Fix

No olvide sustituir /miweb/ por el nombre de su subdirectorio.

Este código simplemente indica a su servidor web qué páginas mostrar cuando los usuarios acceden a los mapas del sitio XML de Yoast SEO.

Ahora puede intentar ver su mapa del sitio XML para ver si esto resuelve su problema / conflicto / incidencia.

3. Cambiar a un plugin XML Sitemaps

Si los métodos mencionados anteriormente no solucionaron el error 404 en la página del mapa del sitio XML de Yoast SEO, entonces puede intentar utilizar un plugin independiente para generar mapas del sitio XML para su sitio web.

La desventaja de este enfoque es que usted tendrá que depender de un plugin independiente para generar mapas del sitio XML y Yoast SEO para otras características de SEO.

En primer lugar, debe instalar y activar el plugin XML Sitemaps. Para más detalles, consulte nuestra guía paso a paso sobre cómo instalar un plugin de WordPress.

Como estás usando Yoast SEO, te mostrará automáticamente un aviso para desactivar el plugin XML Sitemaps o la funcionalidad del mapa del sitio de Yoast SEO.

Yoast SEO XML Sitemap conflict warning

Haga clic en el botón Conmutador del mapa del sitio XML de Yoast SEO para continuar.

Esto le llevará a la pestaña Características en la página SEO ” General. Desde aquí, debe desplazarse hasta la opción XML Sitemaps y desactivarla.

Disabling XML sitemaps in Yoast SEO

No olvides hacer clic en el botón “Guardar cambios” para establecer los ajustes.

Ahora puede cambiar a la página Ajustes ” Mapa del sitio XML para configurar sus mapas del sitio. Para la mayoría de los sitios web, los ajustes por defecto funcionarán a la primera.

XML Sitemaps settings

Pero siempre puedes establecer los ajustes en función de tus necesidades.

Ahora puede enviar la URL del mapa del sitio XML a la consola de búsqueda de Google y a otros motores de búsqueda.

Sitemap URL

4. Cambiar a All in One SEO para WordPress

Si todos los pasos para diagnosticar la incidencia fallan y no desea utilizar un plugin independiente para generar mapas del sitio XML, este método puede ayudarle a corregir el problema / conflicto / incidencia del mapa del sitio 404.

Para este método, necesitarás All in One SEO para WordPress. Es el mejor plugin de SEO para WordPress del mercado y una alternativa mucho mejor a Yoast SEO.

Puedes ver nuestra comparativa Yoast vs All in One SEO para más detalles sobre las diferencias.

All in One SEO (AIOSEO) viene con mapas del sitio XML avanzados con opciones fáciles de gestionar que le dan el control total de lo que debe incluir o excluir de sus mapas del sitio XML.

En primer lugar, debe instalar y activar el plugin All in One SEO para WordPress. Para más detalles, consulta nuestra guía paso a paso sobre cómo instalar un plugin de WordPress.

Nota: también existe una versión gratuita de All in One SEO para WordPress, que incluye la mayoría de las características de los mapas del sitio XML, excepto los mapas del sitio de vídeos y noticias.

Una vez activado, el plugin le guiará a través de un asistente de configuración. Puedes seguir nuestra guía sobre cómo establecer correctamente el plugin All in One SEO para WordPress si necesitas ayuda durante la configuración.

All in One SEO setup

All in One SEO también le permitirá importar datos SEO desde Yoast SEO.

Esto garantiza que todas sus anteriores meta etiquetas y títulos SEO permanezcan inalterados.

Import Yoast SEO data

Después de la configuración inicial, puede ir a la página Todo en Uno SEO ” Sitemaps para establecer los ajustes del mapa del sitio XML.

All in One SEO sitemaps settings

Puede hacer clic en el botón Abrir mapa del sitio para ver si se ha corregido el error 404 del mapa del sitio en WordPress.

Después, configure los ajustes del mapa del sitio si es necesario.

Por ejemplo, All in One SEO le permite elegir qué incluir en sus mapas del sitio. Puede añadir o eliminar tipos de contenido, taxonomías, entradas individuales y páginas.

All in One SEO sitemaps advanced settings

All in One SEO también le permite crear vídeos, noticias, mapas del sitio RSS y mapas del sitio HTML para su sitio web.

Additional sitemaps

Estos mapas del sitio también se pueden enviar a Google Search Console y a otros motores de búsqueda. Esto ayuda a los motores de búsqueda a encontrar rápidamente el contenido más reciente de su sitio web.

Esperamos que este artículo te haya ayudado a corregir el error 404 del mapa del sitio de Yoast SEO en WordPress. También puedes consultar nuestra guía completa para diagnosticar problemas en WordPress o ver cómo corregir errores comunes de WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Descargo: Nuestro contenido está apoyado por los lectores. Esto significa que si hace clic en algunos de nuestros enlaces, podemos ganar una comisión. Vea cómo se financia WPBeginner , por qué es importante, y cómo puede apoyarnos. Aquí está nuestro proceso editorial .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

El último kit de herramientas de WordPress

Obtenga acceso GRATUITO a nuestro kit de herramientas - una colección de productos y recursos relacionados con WordPress que todo profesional debería tener!

Reader Interactions

243 comentariosDeja una respuesta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Reyhan Emilia says

    Thank you because yoast had brought me to an impossible point. I will always read your blogs. You are perfect.

  3. Scott Baranek says

    Thank you so much for this article!!! I have been speaking with multiple people and support teams and I always knew it was something easy. Article was broken down for easy understanding as well. Thank you!!!

  4. Binod Raj Joshi says

    Hey, wpbeginner, I was in sitemap trouble from a few days, now it have been solved. Learning a lot from you guys about wp error fixing, thanks!

  5. saurab says

    Hi
    After moving to https from http, Sitemap address is displaying 404 error, Is it possible know the solution for this ?

  6. Ashish Sharma says

    Nice pluging , but when I am creating sitmap using yoast and submitting it to webmaster it is showing 404 error for multiple urls. I searched in my site no where those urls exist. But y these are coming into sitemap I don’t understand any expert to help me

  7. RAJEEV KUMAR says

    Sir, In my WordPress blog, 410 Response code error are showing in Yoast SEO’S Search Console feature. How I fix It.

  8. Tracy Pope says

    I tried to download the Yoast SEO plug in and I received this error message:

    Fatal error: Call to undefined function apply_filters_deprecated() in /websites/websitename/wp-content/plugins/wordpress-seo/admin/menu/class-admin-menu.php on line 246

    I now can’t get into my back end of the website at all I just keep getting this error? What can I do??

    • WPBeginner Support says

      Hi Tracy,

      You need to connect to your website using FTP or File Manager app in your cPanel account. Go to wp-content/plugins/ and delete wordpress-seo folder. After that you will be able to login to your WordPress admin area and reinstall the plugin.

      Administrador

  9. Amit says

    Hi,

    To edit the .htaccess file do we need to remove the existing code and add your code

    or

    keep the existing code and add your code also?

    Need help.

  10. Keitai says

    hmm,

    Tried every suggestion but still got a 404. somehow i can’t redirect xml html htm php file extensions.

    when i try
    RewriteRule ^sitemap_index.xl$ /site/index.php?sitemap=1 [L] and not
    RewriteRule ^sitemap_index.xml$ /site/index.php?sitemap=1 [L]

    Hence, i removed the “m”, and the redirect works but sitemap_index.xml doesn’t

    Any more tips?

  11. Tony says

    @wpbeginner support. I have already gotten the sitemap, the issue when I submit it to google for test it bring out an error http 404. I have read your post on how to edit .ht access file and wp seo. I have also check and unchecked the yoast plugin. But it hasn’t resolved the http 404. Please help

  12. Tony says

    i just opened a new WordPress site. I have tried everything still the site app generated by yoast seo is still showing http 404 error. What do I do. The website is . please note I have edited my .htaccess file, edited wp-content/Wordpress. Pap, unchecked and checked site map settings for seo, saved permalinks. I even used a free sitemap generator upload the file via my Cpanel but still am getting the same error

  13. nageswarao says

    hi bro my website Google XML Sitemaps not showing last 5 months (sitemap-pt-post-2016-06.xml end after not showing) and also sitemap-tax-post_tag.xml not showing how to solve my problem

  14. Nik says

    Thanks! I was having the hardest time getting it to work and the first section with the .htaccess code did the trick!

  15. Kunal Sarkar says

    Hi all,

    I was facing the same problem while I came across this blog post. But I guess I found a better solution for non-tech guys.

    You can simply install JetPack from WordPress and Activate its Sitemap functionality and disable the Sitemap of Yoast. Additionally Jetpack has a lot of essential features that I guess every WP admin should have.

    Thanks,
    Kunal Sarkar

  16. Mohammed Jhosawa says

    Hi Guys,

    Please follow this steps if you are facing 404 error issue with Yoast XML Sitemap :

    1. Go to > Yoast SEO Plugin.
    2. Yoast SEO Plugin > XML Sitemap.
    3. Uncheck the user XML Sitemap functionality > Save Changes.
    4. Again Check XML Sitemap functionality > Save Changes.
    5. Click on XML Sitemap and you’ll see your sitemap_index.xml right there.

    Hope this information is useful to you.

    Thanks.

  17. Felix says

    Yo here is an easy way to fix it and should work fine for all!

    Go to settings in wordpress

    Select permalinks

    Don’t change anything

    Just Press save changes at the bottom of the page

    Now click on your XML Site Map button again in Yoast

    404 error should no longer show

    You welcome homies

  18. Tim says

    Simply untick “Check this box to enable XML sitemap functionality.” in the SEO plug-in and Save Changes, then renable again. Problem solved.

  19. Miro says

    After adding the first code to your htacces file disable sitemap functionality flush your cache (if you use any of caching tools like w3 total cache) and then enable the functionality again.
    It worked for me that way.

    Thank you for the tutorial! It helped!

  20. Joe says

    Hey guys. I fixed it! I turned this sitemap option off in this flawless plugin and used a different plugin. It was that easy. It was probably my crummy theme though. Probably.

  21. Atanas Tanev says

    Ok guys. I was struggling with this issus for a day or so and finally I found the solution!

    Skip the mentioned plugins and the codes which may harm your website. I’ve tried everything!

    Simply uncheck the “remove strip” from yoast plugin and instead of this option just download and install the plugin: “Remove Category URL” from wordpress plugin section.

    The plugin supports WPML and sitemaps and the 404 error is fixed!

    Now you can buy me a beer for saving all your headaches!

    Cheers!

    Atanas Tanev

  22. Bas says

    i placed the code in my .htaccess file and saved it. Now every page gives a 500 internal server Error!!!
    What can i do?

    • Miles O'Brien says

      What I did was I went to the xml sitemap page under the SEO plugin and under user sitemap I unchecked disable user sitemap. then when I put in the sitemap into webmasters it worked successfully. I can’t help you with your 500 internal error, But if you do this fresh it should work instead of using the code.

  23. Henry says

    If anyone is using iThemes security plug in and has set it to guard the .htaccess file, disable it and create your sitemap, then re-enable.

  24. Nikos Kavvadas says

    I add the code in the .htaccess and then i uncheck the sitemap option in the Yoast’s SEO plugin and save their settings. After that i re-checking the sitemap’s option and the the error is solved!

    Thanks!

  25. Morteza says

    Thanks a lot, but not works for me. I do all of these ways and check/save/uncheck/save/XML Sitemap process after one & both of them… but ERROR 404!
    I’ll try another plugins for this.
    thanks for your great site..

  26. Joshua Largent says

    This is what worked for me – Go to the yoast XML sitemap on your dashboard. Change the Max Entries per sitemap from 1000 to 100. Worked like a charm for me. :)

Deja tu comentario

Gracias por elegir dejar un comentario. Tenga en cuenta que todos los comentarios son moderados de acuerdo con nuestros política de comentarios, y su dirección de correo electrónico NO será publicada. Por favor, NO utilice palabras clave en el campo de nombre. Tengamos una conversación personal y significativa.