{"id":578,"date":"2021-03-24T11:23:36","date_gmt":"2021-03-24T11:23:36","guid":{"rendered":"https:\/\/pixert.com\/blog\/?p=578"},"modified":"2021-04-06T06:07:38","modified_gmt":"2021-04-06T06:07:38","slug":"why-i-do-not-need-rss-feed-on-my-wordpress-blog","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/why-i-do-not-need-rss-feed-on-my-wordpress-blog\/","title":{"rendered":"Why I do not need RSS Feed on my WordPress blog, How to disable it"},"content":{"rendered":"\n<p>One of the problems I found is the number of links with feeds in my blog that are crawled, not indexed by Google.<\/p>\n\n\n\n<p>Frankly I don&#8217;t know how many subscribed to my blog feed. And it feels less effective using RSS feed. For that I decided that <strong>I do not need RSS Feed on my WordPress blog, practically disable the RSS fee<\/strong>d.<\/p>\n\n\n\n<p>Remember, WordPress doesn\u2019t have an option in its Dasboaard to disable feeds, because RSS Feeds Allow Users to subscribe blog posts in your website.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>After a long time not blogging, I returned <a href=\"https:\/\/pixert.com\/blog\" target=\"_blank\" rel=\"noreferrer noopener\">blogging<\/a> and I started repairing the problematic links.<br>I use <a href=\"https:\/\/search.google.com\/search-console\/welcome\" target=\"_blank\" rel=\"noreferrer noopener\">Google Search Console<\/a> to hunt and ask indexing again after repairs<\/p>\n\n\n\n<p>I have a plugin, <a href=\"https:\/\/wordpress.org\/plugins\/redirection\/\" target=\"_blank\" rel=\"noreferrer noopener\">Redirection<\/a> already installed on my website, so I only need a PHP function that disables RSS and tells all that the feed is no longer available, ask them to open the blog\u2019s homepage instead.<br>I use the URL Inspection tool in Google Search Console to recognize which Feed links need to be redirected with Redirection to the Post links <\/p>\n\n\n\n<p>Simply Add this PHP function code to your theme&#8217;s functions.php file<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">\nfunction pxrt_disable_feed() {\nglobal $wp_query;\n$wp_query-&gt;is_feed = false;\n$wp_query-&gt;set_404();\nstatus_header( 404 );\nnocache_headers();\t\nwp_die( __(&#039;Sorry. No feed available,please visit our &amp;lt;a href=&quot;&#039;. get_bloginfo(&#039;url&#039;) .&#039;&quot;&gt;homepage&amp;lt;\/a&gt;!&#039;),&#039;&#039;,404);\n}\nadd_action(&#039;do_feed&#039;, &#039;pxrt_disable_feed&#039;, 1);\nadd_action(&#039;do_feed_rdf&#039;, &#039;pxrt_disable_feed&#039;, 1);\nadd_action(&#039;do_feed_rss&#039;, &#039;pxrt_disable_feed&#039;, 1);\nadd_action(&#039;do_feed_rss2&#039;, &#039;pxrt_disable_feed&#039;, 1);\nadd_action(&#039;do_feed_atom&#039;, &#039;pxrt_disable_feed&#039;, 1);\nadd_action(&#039;do_feed_rss2_comments&#039;, &#039;pxrt_disable_feed&#039;, 1);\nadd_action(&#039;do_feed_atom_comments&#039;, &#039;pxrt_disable_feed&#039;, 1);\nremove_action( &#039;wp_head&#039;, &#039;feed_links&#039;, 2 );\nremove_action( &#039;wp_head&#039;, &#039;feed_links_extra&#039;, 3 );\nremove_action(&#039;wp_head&#039;, &#039;rsd_link&#039;);\n<\/pre><\/div>\n\n\n<p>When Someone Tries To Go To The RSS Feed Link (yoursite.com\/feed\/) They Will Receive A Message That No Feed is Available.<\/p>\n\n\n\n<p>Please remember to remove the links to  RSS feeds  within the WordPress theme or corresponding sidebar and footer widgets after.<\/p>\n\n\n\n<p>Last step, <a href=\"https:\/\/pixert.com\/blog\/basic-robots-txt-for-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">block feeds in robots.txt<\/a>. This will make the search engins robots crawling on-site content, preventing them crawling the feeds.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the problems I found is the number of links with feeds in my blog that are crawled, not indexed by Google. Frankly I don&#8217;t know how many subscribed to my blog feed. And it feels less effective using RSS feed. For that I decided that I do not need RSS Feed on my [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":580,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[158,111,157,159],"class_list":["post-578","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-disable-rss-feed","tag-redirect","tag-redirection","tag-rss-feed"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2021\/03\/0C834D4A-B347-40D3-B941-BCC9B1418764.jpeg?fit=1536%2C1920&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-9k","jetpack-related-posts":[{"id":100,"url":"https:\/\/pixert.com\/blog\/wordpress-automatic-feed-links\/","url_meta":{"origin":578,"position":0},"title":"WordPress: Automatic Feed Links","author":"Pixel Insert \/ Pixert","date":"May 11, 2011","format":false,"excerpt":"WP themes usually have the following code in header.php Remove above when you are using the following code This automatically adds the relevant feed links everywhere on the whole site. Standard feed, comments links, category and tag archives, everything as it should be.","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":183,"url":"https:\/\/pixert.com\/blog\/basic-robots-txt-for-wordpress\/","url_meta":{"origin":578,"position":1},"title":"Basic robots.txt for WordPress","author":"Pixel Insert \/ Pixert","date":"January 6, 2012","format":false,"excerpt":"1. Never allow indexing of the cgi-bin 2. Never allow indexing WordPress folders If you want to allow the \u00a0wp-content\/uploads folder 3. Block feeds, this will make the robots crawling on-site content, gives better ranks in the SEARCH ENGINE RESULT PAGE 4. Never allow indexing trackback 5. Make robots think\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":111,"url":"https:\/\/pixert.com\/blog\/how-to-disable-directory-browsing\/","url_meta":{"origin":578,"position":2},"title":"How to disable directory browsing?","author":"Pixel Insert \/ Pixert","date":"June 3, 2011","format":false,"excerpt":"One of the must do on setting a secure Apache webserver is to disable directory browsing. This could prevent the server from showing a listing of the existing files if there's no index in one folder. Disable directory browsing via .htaccess Add in the .htaccess file the following","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":62,"url":"https:\/\/pixert.com\/blog\/how-to-disable-phpinfo\/","url_meta":{"origin":578,"position":3},"title":"How to disable phpinfo","author":"Pixel Insert \/ Pixert","date":"March 22, 2011","format":false,"excerpt":"The phpinfo() function is a very powerful one, \u00a0you can learn quite a lot about your PHP installation.\u00a0Some server administrators may choose to disable the PHP function phpinfo() for security reasons, because it displays information which can be used to compromise the server that your site is running on. You\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":230,"url":"https:\/\/pixert.com\/blog\/disable-all-shortcodes-from-post-content\/","url_meta":{"origin":578,"position":4},"title":"WordPress: Disable All Shortcodes from the_content","author":"Pixel Insert \/ Pixert","date":"May 31, 2012","format":false,"excerpt":"The following code snippet will remove ALL shortcodes from the_content Add the following code snippet to the functions.php of your theme You can disable shortcodes from particular page, e.g Home Page","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":349,"url":"https:\/\/pixert.com\/blog\/disable-wordpress-automatic-updates\/","url_meta":{"origin":578,"position":5},"title":"How to Disable WordPress Automatic Updates","author":"Pixel Insert \/ Pixert","date":"March 2, 2014","format":false,"excerpt":"WordPress Automatic updates were \u00a0introduced in WordPress 3.7, this means most sites are now able to automatically apply these updates in the background. By default, automatic updates are only enabled for minor core releases and translation files, and \u00a0the application will auto update itself if you're on WordPress 3.9.0 when\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/578\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/580"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}