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 eliminar el campo URL del sitio web del formulario de comentarios de WordPress

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.

¿Quieres quitar / eliminar el campo URL del sitio web de tu formulario de comentarios de WordPress?

Muchos bots y spammers utilizan este campo para conseguir backlinks hacia sus sitios. Quitando el campo ‘Sitio web’, puede hacer inmediatamente que su sitio sea menos atractivo para los spammers.

En este artículo, le mostraremos cómo eliminar el campo URL del sitio web del formulario de comentarios de WordPress.

Removing website URL field from WordPress comment form

¿Por qué se envían comentarios Spam?

Dado que la mayor parte del spam lo generan robots automatizados, puedes combatirlo fácilmente con herramientas y plugins gratuitos. Sin embargo, es mucho más difícil detener los comentarios spam que envían las personas.

Estos comentarios a menudo se salen del tema, son irrelevantes y no añaden valor a la conversación.

Cuando muestra comentarios, WordPress enlaza automáticamente el nombre de usuario de la persona con la URL del sitio web que ha proporcionado. Los spammers pueden utilizar este campo para conseguir backlinks o para intentar mejorar su posicionamiento en determinadas palabras clave.

Al eliminar el campo URL del sitio web, puede disuadir a los spammers de realizar entradas en su blog o sitio web de WordPress.

The default WordPress comment form

Los usuarios auténticos dejarán un comentario independientemente de si obtienen un vínculo de retroceso o no, por lo que esto no debería influir en el número de comentarios de calidad que reciba.

Dicho esto, veamos cómo eliminar fácilmente el campo de sitio web del formulario de comentarios de tu sitio WordPress. Puede utilizar los enlaces rápidos a continuación para saltar directamente al método que desea utilizar:

Método 1: Eliminar campo de sitio web usando un plugin gratuito (Fácil)

La forma más sencilla de quitar el campo URL de tu formulario de comentarios de WordPress es usando Quitar / eliminar enlaces de comentarios y Herramientas de comentarios. Este plugin te permite quitar el campo y también borrar cualquier enlace de los comentarios que ya has aprobado.

En primer lugar, debe instalar y activar el plugin Comment Link Remove and Comment Tools. Para obtener instrucciones detalladas, consulte nuestra guía sobre cómo instalar un plugin de WordPress.

Una vez activado, haga clic en QC CLR Settings en el escritorio de WordPress.

Comment Link Remove and Comment Tools plugin

Aquí, marque la casilla siguiente a “Quitar el campo SITIO WEB del formulario de comentarios”. Esto disuadirá a los spammers de insertar sus enlaces.

Dicho esto, todos los comentarios que hayas aprobado anteriormente seguirán conteniendo un enlace. Para eliminar estas URL, simplemente marca la casilla siguiente a “Quitar hipervínculo del comentario Biografía del AUTOR”.

Después, basta con desplazarse hasta el final de la página y hacer clic en el botón “Guardar cambios” para establecer los ajustes.

Saving the changes made with the Comment Link Remove plugin

Para ver este cambio en acción, salga de su cuenta o visite su sitio web en una pestaña de incógnito.

Verá que el formulario de comentarios ya no tiene el campo URL del sitio web.

Comment form without website URL field

Además, los nombres de autores de comentarios que solían tener enlaces ya no los tendrán, y los usuarios ya no podrán hacer clic en ellos.

Uno de los signos reveladores de esto es que el color del texto del nombre del autor del comentario que solía tener enlaces será el mismo que el del que no los tiene.

Example of comment author names that don't have links

Método 2: Quitar el campo URL del sitio web de los comentarios de WordPress usando código

Otra opción es quitar / eliminar el campo URL del sitio web utilizando un fragmento de código.

La razón por la que queremos mostrarte este método es que, aunque el plugin puede quitar el campo URL, sigue manteniendo la casilla de verificación “Guardar mi nombre, correo electrónico y sitio web en este navegador para la siguiente vez que comente” en la parte inferior.

Para mantener la coherencia, queremos cambiar este texto por “Guardar mi nombre y correo electrónico en este navegador para la siguiente vez que comente”. Y podemos hacerlo usando código personalizado.

A menudo, los tutoriales le dirán que añada fragmentos de código personalizados al archivo functions. php de su tema.

Sin embargo, no se lo recomendamos porque incluso un pequeño error en su código podría causar una serie de errores comunes de WordPress o incluso romper su sitio por completo.

Por eso recomendamos usar WPCode. Es la forma más fácil y segura de añadir código personalizado en WordPress sin tener que editar ningún archivo del núcleo del tema.

Nota: Aunque existe un plugin WPCode gratuito, utilizaremos la versión premium para este tutorial.

Lo primero que tienes que hacer es instalar y activar el plugin WPCode en tu sitio web. Para más detalles, consulta nuestra guía paso a paso sobre cómo instalar un plugin de WordPress.

Añadir código para quitar el campo URL del sitio web en el formulario de comentarios

Una vez activado, vaya a Fragmentos de código ” Añadir fragmento.

How to add a code snippet to WordPress

A continuación, vaya a la pestaña “Comentarios” y busque el fragmento de código “Desactivar formulario de comentarios URL del sitio web”.

Si aún no te has conectado a la biblioteca de WPCode, entonces ahora harás clic en el botón ‘Conectarse a la biblioteca para desbloquear (Gratis)’.

En este punto, simplemente accede a tu cuenta WPCode.

Después de eso, simplemente vuelva a la página anterior del plugin WPCode. Ahora verás que el botón ha cambiado a ‘Usar fragmento de código’. Haz clic en él para utilizarlo.

Clicking 'Use snippet' in the Disable Comment Form Website URL code snippet in WPCode

Ahora verá la pantalla del editor de fragmentos de código con el código para quitar el campo URL del sitio web del formulario de comentarios.

Ahora sólo tienes que hacer clic en el conmutador “Inactivo” para que aparezca “Activo”. A continuación, haz clic en “Actualizar” para activar este fragmento de código.

Activating the Disable Website URL Comment Form code snippet in WPCode

Ahora, los visitantes ya no pueden añadir la URL de un sitio web a sus comentarios.

Añadir código para quitar enlaces existentes en los nombres de autor de los comentarios

El código del paso anterior solo quita el campo URL del sitio web de los formularios de comentarios, pero los comentarios existentes con nombres de autor enlazados seguirán teniendo enlaces.

Afortunadamente, también puede quitarlos fácilmente con WPCode. Lo que tienes que hacer es volver a Fragmentos de código ” Añadir fragmento. A continuación, haga clic en “Usar fragmento de código” en “Añadir su código personalizado (nuevo fragmento de código)”.

Adding custom code in WPCode

Ahora, puede darle un nombre a este fragmento de código para que sea fácilmente identificable. Puede ser algo sencillo como ‘Eliminar hipervínculos en el nombre del autor del comentario’.

Después, cambie el Tipo de código a ‘Fragmento de código PHP’.

Creating a code snippet in WPCode to remove hyperlinks in existing comment author names

Una vez hecho esto, copie y pegue el siguiente fragmento de código en el cuadro Vista previa del código:

function wpbeginner_remove_comment_author_link( $return, $author, $comment_ID ) {
    
    // Simply return the comment author without the link
    return $author;
}

// Hook the custom function into the 'get_comment_author_link' filter
add_filter( 'get_comment_author_link', 'wpbeginner_remove_comment_author_link', 10, 3 );

Desplazándose hacia abajo, asegúrese de que el Método de Inserción es ‘Insertar automáticamente’ y la Ubicación es ‘Ejecutar en todas partes’.

Después, basta con activar el código y hacer clic en “Guardar fragmento de código”.

Choosing the insertion method and location in WPCode

Ahora, ya no verás que los nombres de autor de los comentarios más antiguos tienen enlaces en ellos.

Añadir código para reemplazar el texto de lacasilla de verificación de aceptación de cookies de comentarios

Si eliges mostrar la casilla de verificación de aceptación de cookies de comentarios en tu formulario de comentarios, entonces lo más probable es que veas este texto de verificación: “Guardar mi nombre, correo electrónico y sitio web en este navegador para la siguiente vez que comente”.

Tener esta casilla de verificación con este aspecto cuando ya no tiene el campo URL del sitio web parecerá bastante incómodo. Por lo tanto, es una buena idea para reemplazar este texto.

Para ello, basta con crear un nuevo fragmento como en el paso anterior y hacer que el tipo de código ‘PHP Snippet.’ Puedes nombrar este código ‘Replace Comments Cookies Opt-In Checkbox Text’.

A continuación, copie y pegue el fragmento de código siguiente en el cuadro Vista previa del código:

// Hook a custom function 'remove_website_from_checkbox_text' into the 'gettext' filter
add_filter('gettext', 'remove_website_from_checkbox_text');

function remove_website_from_checkbox_text($translated_text) {
    // Replace the original text with the modified text
    $translated_text = str_replace(
        'Save my name, email, and website',   // Original text to find
        'Save my name and email',            // Replacement text
        $translated_text                      // The text being processed
    );

    // Return the modified translated text
    return $translated_text;
}

Puede establecer los ajustes de Método de inserción y Ubicación como antes.

Una vez hecho esto, basta con activar el código y hacer clic en “Guardar fragmento de código”.

Si el código es correcto, debería ver que el texto de inclusión cambia a “Guardar mi nombre y correo electrónico en este navegador para la siguiente vez que comente”.

Este es el aspecto del texto de suscripción en nuestro sitio de prueba:

Save my name and email in this browser for the next time I comment checkbox text

Esperamos que este artículo te haya ayudado a aprender cómo eliminar el campo URL del sitio web del formulario de comentarios de WordPress. Puede que también quieras ver nuestra guía sobre cómo ganar dinero online blogueando con WordPress y nuestra selección de los mejores plugins para formularios de contacto.

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

105 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!

    • WPBeginner Support says

      If it does not work on a site, it likely means that the theme being used is overriding the default comment form.

      Administrador

  2. Dipu says

    Hello, thank you for creating a valuable blog post as it was a question of many about how to remove the website field from the comment form.

    I want to know that if allowed the website filed, is it helpful for SEO, because they are nofollow links?

  3. Anna Mildwater says

    Hi, this didn’t work for me (adding the code in the functions.php file) to remove the url field. I’m using a child theme for Astra, so i added it to the functions.php for that. Is that correct?

    • WPBeginner Support says

      Adding it to your child theme’s functions.php is the correct thing to do. If it didn’t remove it for you, the theme you are using may have its own method for displaying the field where you would want to check with the support for the child theme you are using and they should be able to assist!

      Administrador

  4. Andres Berejnoi says

    Thank you for this tutorial. I have been looking for a way to remove that field for a while. It makes the comment section look more crowde, and it is just an extra step for a legitimate commenter. However, is it possible that my site will become slower if I install these kinds of plugins to solve each problem?

    So far, I have not noticed the difference, but I have installed only maybe 5 besides the ones that come by default with the theme.

  5. Obaid says

    What I do is manually approve comments. Might be exhaustive for a large website, but it’s useful for beginners.

  6. Arthur Morehead says

    The plugins have not been updated in 5 years so I’ll just use the code to remove the URL field. I am using Generate Press (child) theme and not sure if I place it before or after the ?>

  7. Dan says

    This still works in 2021.

    Thanks for the code. That was easy! Glad to be rid of the website URL field for the comments.

  8. Emmeline says

    Is there any way to block specific URLs from the actual comment content? When I removed the website field and hyperlink ability, it didn’t stop the spammers from just typing their website at the bottom of their comment. The default “disallowed comment keys” feature matches inside words and not just the entire URL, so I can’t block them that way either (they aren’t using distinct keywords). And of course they use a different email address every time, even though I can tell it’s the same person/group. Right now I’m deleting their comments manually, but it’s very annoying because there are so many. Any advice?

  9. Huzaifa Farrukh says

    First of all, thanks for always sharing useful tutorials like this.❤️

    Secondly, I think I probably never had spend my more time on comment section instead of the article itself…

    Quite a conversation going on between Syed and “commenters”

    • WPBeginner Support says

      Glad you like our tutorials and there likely is some spam that got by in the comment section if that is what you are talking about. Not everyone is perfect in terms of moderating comments. :)

      Administrador

  10. Sharon says

    Thank you for this post among your other informative posts. This was very helpful. I have been receiving spam comments with website links to other websites. It didn’t help that WordPress has default “website” field for those leaving a comment. This helps. Thanks again for writing this article.

  11. mohit nagar says

    hello sir,
    i use your tutorial to remove website option from comment.

    i copy and paste the code in my functions.php but it only website field location change.

    • WPBeginner Support says

      You may want to check with your specific theme’s support to see if they could be overriding something on their end.

      Administrador

  12. James Emmanuel says

    Thanks for this article, it was helpful… too much spams while comment section of our site was with link. we actually switched to disqus, but disqus java was too much and had some impart on site speed. with your gauide, we are again back to normal.

  13. pawan says

    Your articles always helpful for me,
    All content on the website really very helpful

    Thanks a lot for sharing such a helpful information

  14. Vara Prasad says

    Hey big fan for wpbeginner website and your code works perfectly for my disktop& mobile website can plz tell my how to remove Website URL Field from Amp pages and post please

      • VARA PRASAD says

        i used code from wpbeginner website which works perfectly for the normal site but Amp pages showing Website URL field i am using newspaper theme

        • WPBeginner Support says

          You may want to reach out to your theme’s support to see if they have styling set up that could be overriding the code here

  15. George Conklin says

    I came to your website on purpose looking for a way to remove the Website/URL field on comments forms when I cannot use the functions.php method, so obviously I was looking for a plugin to do that. There doesn’t seem to be an up-to-date and reliable plugin that does this unless its baked into the functionality of another plugin. It might be a great idea to update this post just for that purpose – a working plugin :)

  16. Iqbal Hussain says

    How to edit “Your email address will not be published. Required fields are marked *” in wordpress comment form?

  17. Tia Mcintosh says

    Hey i downloaded and activated both and neither did anything to the comments box. I am just trying to get ride of the option for the comment author to put their website in.

  18. Vishal says

    Hey there everyone, my theme is Twenty-Seventeen and I was able to remove the “Website URL” field from the Comment Section by just adding this single line code to “Additional CSS” section while customizing it through Appearance>Customize. The code is:

    .comment-form-url {display:none;}

    This might help or give you some idea I hope :-)

  19. obed says

    uncheck the ‘required email and website’ options in settings -> discussion on the dashboard
    add the following code to your custom css

    #respond .comment-form-email, #respond .comment-form-url {
    display: none;
    }

  20. Naeem Hussain says

    Dear is there any other way to disable website field from my ComputerPakistan Website. Actually I do not want to add any more plugin in my site.

  21. Pravin Singh says

    Great article and good information. However, both the plugins mentioned have not been updated for many years and could have compatibility issues with latest versions of WordPress.

    Is there an alternative plugin to disable these URLs? If yes, could you kindly update the article as it would be really useful

  22. Jazib says

    Hi guys
    I like the article but i have concern here that plugins that you have recommended are two years old and unmaintained. Should i install it or not?

    Currently i am using No Captcha service from Google via a plugin.

  23. yellowans says

    hello guys
    very interesting topic helped me a lot. here is my issue I deactivacted name, email and url, from my comments. now my comment section is just that comments, nothing else shows.
    however the comment for still shows a space for name email and url, the url box I canceled and is not displaying anymore thanks to a plugin,
    my question, which plugin (not really a fan of css) can I use to rid of name and mail on the comment entry form thank you and regards :)
    website theme twenty thriteen

  24. Farhan Shah says

    I had used a plugin “stop spam comments” for stopping spam comments. but after few week felt that I have reduced website hit on my website. my question is that comments has been stopped but why reduced website hits?
    Please tell me should I remove this “Stop Spam Comments” plugin and install this plugin “Disable / Hide Comment URL”?

    regards

  25. Ciprian C. says

    Why not just CSS?

    p.comment-form-url {height: 0 !important;overflow: hidden !important;}

    not the best solution but it works for me.

      • Chris Mayell says

        I can corroborate that CSS changes will not suffice.
        I was hoping that a simple display:none trick might work. But the messages keep coming.

        I’m going to install the plugin you mentioned now.
        Thanks to the author for the good suggestion & helpful article.

  26. Colin Crawford says

    Perhaps the major search engines should look into this as well. These backlinks are getting out of hand, just like when we added keywords to the meta keywords tag. That was abused and now these backlinks are getting abused.

    I use a plugin called Disable Comments throughout some of my websites so no one can leave any. So far it has worked but the other websites receive on a daily basis quite a number. Reading through them, there is many adverts with lots of links, people saying how insightful your website is. For one I do not or have ever heard anyone say insightful so straight into the Spam bin.

    I don’t think the amount of backlinks should influence your rankings as they can be too easy to get. I went after a web design job and the owner wanted to do some Off page SEO and wanted the successful applicant to be able to get at least 2000 backlinks for that website. Well I didn’t get the job and glad, probably spend the day leaving insightful comments on other peoples websites.

    • Editorial Staff says

      Hey Colin,

      Comments definitely encourage conversations like this one here. But yes, spammers are ruining it for the webmasters. Getting rid of the link feature has definitely helped reduce spam comments on the site.

      Administrador

  27. Jenny says

    Wondering if you could address a couple of concerns? For the plug-in “Disable / Hide Comment URL”
    1. is only compatible to 3.2.1.
    2. the last update was 2011-9-2 (really old)

    • Editorial Staff says

      If you look at the code of this plugin, it is very simple, and it works. You can take the code and dump it in your functions.php file…

      function disable_comment_url($fields) { 
          unset($fields['url']);
          return $fields;
      }
      add_filter('comment_form_default_fields','disable_comment_url');
      

      So in short, no this plugin is compatible with recent versions. The author just didn’t update the plugin because it simply works. Why update when it is not broken?

      Administrador

      • Regev says

        Awesome!

        How do I also…

        1. Change the default “Your email address will not be published. Required fields are marked *” into a custom text, like you have done.

        2. Remove the * from “Name” and “Email”, and change “Name” to “Your Real Name”

        Thanks.

  28. Gautam Doddamani says

    i guess we already had a long conversation about this a long time back…i think since you got rid of livefyre…yea i agree this helps get rid of spam users and keep legit comments comin’! real nice plugins…wil check ‘em out! :)

    Cheers,
    Gautam

  29. Shalu Sharma says

    Nice article and I can understand why people want to remove it but can’t you use the right plugins to moderate and control spam? Thanks for the tutorial, if I do decide to then I know where to look for it.

  30. Cliff Beneventi says

    Thanks for the article. Reducing or eliminating spam is a critical part of comment management. Akismet does a great job for my clients, but uses URL’s to determine if a comment is spam. This plugin would then render Akismet less effectual. Also, the user can simply insert a URL in the comment itself, can they not? Lastly, I thought that the bulk of spam comments were generated by bots, which would still populate the comment field, even in the absence of a URL field.

  31. Zimbrul says

    What crosses my mind right now is this “being WPBeginner, o e of the solid sites out there providing quality WordPress tutorials and advice, you can afford to not show the author link on your comment form”. In fact this will dicourage many to comment unless they really have something to say.
    I only comment on articles that interest me and never said just “oh, great article, I’ll bookmark it, fantastic piece of writing”.

    • Elliott Richmond says

      Agreed, if someone is making the effort to comment on an article the least you can do is credit them with a link! After all it’s about the community right? I noticed this on WPB a while ago and it put me right off commenting full stop! Not that I comment for the backlink because it’s a nofollow anyway but because if any other commenters what to check me out they can.

      • Zimbrul says

        Yes, this is the idea of the author website field. But, as I said, I do mot comment here at wpbeginner for backlinks or for make myself known. I use WP Beginner website to get answers and to implement new te tehniques on sites I develop.
        I only comment to topics I can “technically” comment, that’s it.

      • Editorial Staff says

        Elliot, first of all I’m sorry to hear that you have stopped commenting on WPBeginner just because we decided to get rid of the URL field. While your initial intentions weren’t to get backlinks, but your decision to stop commenting after we get rid of the field only emphasize the point.

        If you do not think that a community is worth contributing to just because you are not getting a backlink/promotional value, then I don’t think that you value the community enough.

        We have had internal communications about establishing a proper registration system for regular users on WPBeginner. This would allow us to unlock certain perks (i.e backlinks to all of your new and previous comments after you hit comment count marker X). But again, I feel odd because I’m offering incentives for users to comment which is favoring quantity over quality.

        I will probably have this added as one of the questions in our annual survey for the WPBeginner audience.

        Administrador

        • Elliott Richmond says

          Not “stop commenting” or “stopped commenting” just “put off” ^_^
          On the contrary I do value the community and I hope that I do offer value back to the community (albiet in a very small way compared to others) and I find your tone a little insulting to be honest!
          I believe that there are other contributors who I would certainly like to find out more about but seeing as you have denied a link back to their site where I can find out about “the community” it kind of defeats the object wouldn’t you agree? Fortunately I do recognised some of the contributors who I do value, Pippin being one of them but, if I’d like to find out about others then I have no chance right?

        • Editorial Staff says

          I won’t argue semantics of stop commenting or “commenting full stop”. Nonetheless, I see your point of finding user’s information and following up with them elsewhere. One thing that can be done perhaps is hyperlink all gravatar images with the user’s gravatar profile? Would you say that is a good solution?

          Always love hearing user feedback. This is why I will be adding this in the user survey that we are planning on sending out.

          -Syed

    • Editorial Staff says

      Zimbrul, first of all, I really appreciate you as a user. I have your gravatar memorized because I know you are one of our regular users. This technique is not to discourage users like yourself because you add relevant and useful conversation to the articles like this comment of yours.

      It is also one of the reasons why our site automatically approves your comment :) But you are among the exception. I can personally tell you that this is a big issue specially if you are running a tech related tutorial blog.

      SmashingMagazine has the same thing. They did this long time ago, way before WPBeginner. Reason was the same. I as a user appreciated their decision of getting rid of URLs because then I could engage in meaningful conversations with real people (not those drop by’s who might add controversial comment just to get a backlink and never check back).

      -Syed

      Administrador

      • Zimbrul says

        Syed, your kind words means more than a backlink for me, don’t you guys agree? For me the words of appreciation from one of the most respected figures in WordPress community means a lot and as I said I come here not for the backlink but for problem solving most of the time. Sometimes I need advice sometimes I can contribute.

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.