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

Come disattivare i feed RSS in WordPress (2 modi semplici)

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Volete disabilitare i feed RSS sul vostro sito WordPress?

I feed RSS consentono agli utenti di iscriversi ai post del blog. Tuttavia, quando si costruiscono piccoli siti web statici, è preferibile disattivare i feed RSS. Per impostazione predefinita, non esiste un’opzione per rimuovere i feed RSS in WordPress.

In questo articolo vi mostreremo come disabilitare i feed RSS in WordPress.

How to disable RSS feeds in WordPress

Cosa sono i feed RSS e perché disabilitarli?

L’RSS è un tipo di feed web che aiuta gli utenti a ricevere aggiornamenti e contenuti in tempo reale dal vostro sito web. RSS è l’acronimo di Really Simple Syndication o Rich Site Summary. Consente ai lettori di ricevere automaticamente nuovi contenuti nelle newsletter di posta elettronica, nei lettori di feed RSS e in altri dispositivi.

Mentre i feed RSS sono utili per il vostro sito web, WordPress può aggiungere più feed che potrebbero non essere utili. Ad esempio, esistono feed per tassonomie, feed per autori, feed per singoli post e pagine e altro ancora.

È possibile disattivare questi feed RSS ed evitare che i motori di ricerca come Google esauriscano la loro quota di crawl del sito. In questo modo, i bot dei motori di ricerca non effettueranno il crawling di feed che non sono rilevanti per il vostro sito e indicizzeranno invece pagine più importanti.

Inoltre, la disabilitazione dei feed RSS ha senso se non si gestisce un blog su WordPress, ma si utilizza WordPress più come CMS (sistema di gestione dei contenuti) o come semplice costruttore di siti web. È perfetto anche per i negozi di e-commerce che non hanno un blog.

Noi di WPBeginner abbiamo disattivato diversi feed RSS per migliorare le nostre classifiche SEO.

Detto questo, vediamo come disattivare i feed RSS in WordPress.

Metodo 1: Disattivare i feed RSS con un plugin

Il modo più semplice per disabilitare i feed RSS è utilizzare un plugin per WordPress come All in One SEO (AIOSEO).

È il miglior plugin SEO per WordPress e consente di ottimizzare il sito per i motori di ricerca senza richiedere conoscenze tecniche o assumere un esperto.

All In One SEO - AIOSEO

Questo metodo è più semplice ed è consigliato ai principianti. Per questo tutorial utilizzeremo la versione AIOSEO Lite, che consente di disabilitare i feed RSS in WordPress.

Tuttavia, se si desidera incrementare le classifiche di ricerca, è possibile utilizzare la versione Pro di AIOSEO per sbloccare funzioni più potenti come le sitemap XML e il gestore di reindirizzamenti, il controllore di link interrotti e l’assistente di link.

La prima cosa da fare è installare e attivare il plugin AIOSEO. Per maggiori dettagli, consultate la nostra guida passo-passo su come installare un plugin di WordPress.

Dopo l’attivazione, verrà visualizzata la procedura di configurazione guidata. È sufficiente fare clic sul pulsante “Cominciamo” e seguire le istruzioni sullo schermo. Per maggiori dettagli, consultate la nostra guida su come configurare All in One SEO in WordPress.

Click let's get started AIOSEO setup wizard

Successivamente, si può andare su All in One SEO ” Aspetto della ricerca dalla dashboard di WordPress e selezionare la scheda “Avanzate”.

Successivamente, è possibile scorrere fino all’opzione “Crawl Cleanup” e fare clic sulla levetta per attivarla.

Go to AIOSEO advanced settings in search appearance

Una volta attivata l’opzione Crawl Cleanup, è sufficiente scorrere verso il basso fino ai feed RSS che si desidera disattivare.

Si consiglia di mantenere abilitato il Feed RSS globale, perché consente agli utenti iscritti di ricevere gli ultimi aggiornamenti. Disabilitarlo significherebbe che gli utenti non saranno in grado di iscriversi al vostro sito web, il che potrebbe danneggiare la SEO di WordPress.

Disable RSS feeds

D’altra parte, è possibile disattivare altri tipi di feed RSS.

Ad esempio, è possibile disattivare i feed RSS per gli autori, la ricerca, gli allegati, la tassonomia e altro ancora.

Save changes to RSS feed

Non dimenticate di fare clic sul pulsante “Salva modifiche” quando avete finito.

Metodo 2: Disattivare manualmente i feed RSS in WordPress

Un altro modo per disabilitare i feed RSS in WordPress è aggiungere del codice al file functions.php del vostro tema.

Non suggeriamo di modificare il file functions.php a meno che non siate utenti avanzati, perché anche il minimo errore può danneggiare il vostro sito. Per questo motivo consigliamo di utilizzare WPCode per incollare qualsiasi snippet in WordPress.

Per prima cosa, è necessario installare il plugin gratuito WPCode. Per maggiori informazioni, consultate la nostra guida passo passo su come installare un plugin di WordPress.

Dopo l’attivazione, trovare Code Snippets “ Add Snippet nella dashboard di WordPress. Quindi digitate semplicemente “rss” nella barra di ricerca per trovare lo snippet preconfigurato nella libreria di WPCode.

Passare il mouse sulla voce “Disabilita feed RSS” che appare a destra, quindi fare semplicemente clic sul pulsante “Usa snippet”.

Use WPCode to Disable RSS feeds

Nella pagina successiva, si vedrà il seguente snippet. Si noti che WPCode ha già impostato tutte le opzioni per voi. Con gli snippet preimpostati, non è necessario personalizzare nulla.

Se si è un utente avanzato, si può comunque fare copia/incolla nel proprio file functions.php:

/**
 * Display a custom message instead of the RSS Feeds.
 *
 * @return void
 */
function wpcode_snippet_disable_feed() {
	wp_die(
		sprintf(
			// Translators: Placeholders for the homepage link.
			esc_html__( 'No feed available, please visit our %1$shomepage%2$s!' ),
			' <a href="' . esc_url( home_url( '/' ) ) . '">',
			'</a>'
		)
	);
}

// Replace all feeds with the message above.
add_action( 'do_feed_rdf', 'wpcode_snippet_disable_feed', 1 );
add_action( 'do_feed_rss', 'wpcode_snippet_disable_feed', 1 );
add_action( 'do_feed_rss2', 'wpcode_snippet_disable_feed', 1 );
add_action( 'do_feed_atom', 'wpcode_snippet_disable_feed', 1 );
add_action( 'do_feed_rss2_comments', 'wpcode_snippet_disable_feed', 1 );
add_action( 'do_feed_atom_comments', 'wpcode_snippet_disable_feed', 1 );
// Remove links to feed from the header.
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );

Se lo si desidera, è possibile cambiare il testo del segnaposto con un messaggio personalizzato, ma è del tutto facoltativo.

The WPCode snippet to Disable RSS feeds

Ora è sufficiente attivare l’interruttore “Attivo” e fare clic su “Aggiorna”. D’ora in poi i feed RSS saranno disattivati.

Speriamo che questo articolo vi abbia aiutato a capire come disabilitare i feed RSS in WordPress. Potreste anche voler consultare il nostro elenco degli errori più comuni di WordPress e come risolverli o la nostra guida su come avviare un podcast con WordPress.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

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.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

22 commentiLascia una risposta

  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. Mrteesurez says

    This is helpful.
    It’s also recommended for eCommerce or eLearning stores that don’t have posts, nice article.

    But the method of using WPcode didn’t disable the RSS for particular page or taxonomy. It disable them all and replace with custom message.

    How can I only select or adjust to only disable RSS on specific post, taxonomy or post type ??

  3. frank says

    The code has priority 1 in several lines but the wp code plugin as well as the t code fragment and places priority 10 for all the code in general, is it necessary to change it to priority 1 as well? or does it make no difference?

    • WPBeginner Support says

      It should not be required but should you have any trouble you can feel free to change the priority of the snippet from the plugin :)

      Admin

  4. Vishal says

    Hi.. Team
    Helpfull Article
    after installing the RSS feed disabled plugin, Whether or not articles will appear in Google News

      • Vishal says

        I do not want anyone to take the content of the website from the RSS feed. I want to stop the RSS feed for the third party website.

        My website is also in Google News. I want to give my RSS feed To Google News. But not other third Party websites.

        Please Guide me How to Stop RSS Feed For 3rd party Websites

        • WPBeginner Support says

          We do not have a recommended method for that kind of limitation at the moment.

  5. Tobias Hyldeborg says

    After having pasted the code in my functions.php, nothing happens. I still get a page saying “You do not have an RSS reader installed”. Are there other ways to remove the RSS feed, I am trying to minimize the use of plugins on my site.

    • WPBeginner Support says

      You may want to ensure you cleared any caching in your browser/hosting provider to ensure you’re not viewing a cached page.

      Admin

  6. Mike Mahaffey says

    HI

    Can you tell me about WordPress adding “feed” to the end of some of my urls that show up as 404 errors?

    /what-to-make-a-website-aboutfeed

    I’ve been redirecting them but don’t know whether that’s necessary or not?

    Does this even have anything to do with RSS? And do you know how to stop it from happening?

    Thanks for your website, I don’t know where I would be without it.

  7. james says

    after disabling feed annd removing link rel of feed in my view source ive set an 500 response code in my google webmaster,,

  8. sumit says

    thant a great artical some one are feeded my artical then with your help i disabled my sited feed thanks you very much.

  9. wazomba says

    I fisrt used to plugin to disable RSS feed. But the RSS link still appeared on BP Wall, so I simply add a css trick in me theme style file : .feed{display:none;}. Done!

  10. Annn says

    Does removing RSS access have any effect on rankings?
    or does this simply prevent people taking content via rss methods…

    Thanks

    • Mia Rhode says

      Does temporarily disabling my RSS feed delete my database of current subscribers? I am trying to post an article and backdate it, so I don’t want it to be sent out via RSS.

  11. Jhonatan says

    The function is pretty neat and helpful.

    The function does not allow WordPress to add any information to the RSS .php files.. instead it re-writes it.

    I advise anyone to install the plugin and to add the function into functions.php of your theme file.

    The plugin removes the generate HTML source code, you will get rid of 2 useless lines.

  12. Tim G. says

    Thanks for sharing this! It worked great with one exception: when I add ‘/?feed’ to the end of the root domain, it is still calling a listing page showing the posts that I am trying to make inaccessible via the built-in feeds.

    I’ve tried refreshing my permalinks but that didn’t make a difference. Is there some other rule I need to add to the functions file (in a child theme in case that matters, btw) to address this, or maybe I can disallow it from the .htaccess file?

  13. Debbie says

    My comments get published as posts which end up in my main RSS feed. Any idea on how to fix this? Ive read it may be a setting but so far we cant find it.

  14. nacho says

    Hi there! nice post!!!

    I love the functions.php code, but I’m using buddypress and the code dont disable the activity feed, someting like:

    How could I disable this?

    Thanks in advanced and regards from Spain.

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.