• 0

google is showing wordpress sitemap in search results

Go to solution Solved by Hussam Al-tayeb,


Hussam Al-tayeb

Google is showing the actual wordpress sitemap.xml in search results which I don't want.
The sitemap is generated by all in one seo plugin. it's a dynamically generated file.
there is no real sitemap.xml file on the server.
I want to noindex it.
I tried those rules in htaccess but they don't work. this is probably due to the fact that the file isn't real.

<FilesMatch "sitemap\.xml">
Header set X-Robots-Tag "noindex"

<Files sitemap.xml>
Header set X-Robots-Tag "noindex"

<FilesMatch "\.xml$">
Header set X-Robots-Tag "noindex"

Any other way to do it?


*Edited for better wording*

Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Steven P.

If you can't disable it from the SEO plugin why not create the file yourself and chmod it so it can't be overwritten? Just a thought?

Link to post
Share on other sites
  • 0
Hussam Al-tayeb

Because I still want it to be auto-generated from posts.

I just want google to not place the actual sitemap.xml itself in google search results.

Link to post
Share on other sites
  • 0
Hussam Al-tayeb

I already tried that :) (notice the three rules in first post) but it won't work on  "virtual" files.

Any way for a rule to intercept a requested string?


Edit: I got it.

I added 

header("X-Robots-Tag: noindex", true);

to the script that generates the virtual sitemap.xml


so now it is:

echo '<?xml-stylesheet type="text/xsl" href="' . $plugin_path . 'sitemap.xsl"?>' . "\r\n";
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\r\n";
header("X-Robots-Tag: noindex", true);

How do I mark a thread as solved?

Edited by Hussam Al-tayeb
Link to post
Share on other sites
  • 0
Steven P.

Did it for you.

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Jay Bonggolto
      You will soon be able star a message in the Android Messages app
      by Jay Bonggolto

      In April of this year, Google expanded the Android earthquake alerts system to Greece and New Zealand, where users can receive notifications about earthquakes in those countries. Google today announced a new expansion for that feature along with new updates for Android that focus on new experiences and improved security.

      The alert system is now rolling out in regions where the risk of earthquake is high including Turkey, the Philippines, Kazakhstan, Kyrgyz Republic, Tajikistan, Turkmenistan, and Uzbekistan. People in these countries will get notifications a few seconds before an earthquake happens. Google is expanding it to more countries over the coming year.

      Google is also launching a new capability in the Messages app that will let you star an important message. It's available from today and will go live to more users over the next few weeks. To get started, you can simply tap and hold a message to star it. You can then visit the starred category to view messages you've marked as important.

      The Emoji Kitchen is also adding contextual suggestions after you've composed a message. It's available from today in Gboard beta. It's set to exit beta in the summer and will go live for messages written in English, Spanish, and Portuguese on devices running Android 6.0 or later.

      Android now also lets you open and access apps using your voice. In addition, Voice Access has added gaze detection in beta so you can use your voice to navigate your phone or an app only when you're looking at the screen. Google has also improved its password input so you can input letters, numbers, and symbols using your voice when a password field is detected.

      Finally, Android Auto has received new customization options such the ability to change your launcher screen directly from your mobile device and turn on dark mode. It also gained a “back to top” option and new tabs in the media apps so you can browse content more easily. Messaging apps are also now available directly via the launcher screen while EV charging, parking, and navigation apps are now accessible in Android Auto. These features are live globally on phones running Android 6.0 or later.

    • By Copernic
      Google Chrome 91.0.4472.106 (offline installer)
      by Razvan Serea

      The web browser is arguably the most important piece of software on your computer. You spend much of your time online inside a browser: when you search, chat, email, shop, bank, read the news, and watch videos online, you often do all this using a browser.

      Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. Use one box for everything--type in the address bar and get suggestions for both search and Web pages. Thumbnails of your top sites let you access your favorite pages instantly with lightning speed from any new tab. Desktop shortcuts allow you to launch your favorite Web apps straight from your desktop. Chrome has many useful features built in, including automatic full-page translation and access to thousands of apps, extensions, and themes from the Chrome Web Store.

      Google Chrome is one of the best solutions for Internet browsing giving you high level of security, speed and great features.

      Important to know! The offline installer links do not include the automatic update feature.

      Download web installer: Google Chrome Web 32-bit | Google Chrome 64-bit | Freeware
      Download: Google Chrome Offline Installer 64-bit | 72.7 MB
      Download: Google Chrome Offline Installer 32-bit | 70.3 MB
      Download: Google Chrome MSI Installers for Windows (automatic update)
      View: Chrome Website | v91.0.4472.106 Release Notes

      Get alerted to all of our Software updates on Twitter at @NeowinSoftware

    • By zikalify
      Canonical announces Ubuntu Pro for Google Cloud
      by Paul Hill

      Canonical has announced that Ubuntu Pro is now available on Google Cloud. According to the firm, Ubuntu Pro is a premium version of Ubuntu aimed at enterprise and production use that comes with several additional features including live kernel patching, a 10-year maintenance commitment, and patches for software in Ubuntu’s universe repository.

      Commenting on the news, June Yang, VP and GM, Compute, Google Cloud, said:

      Unlike the Ubuntu you may be familiar with on desktop systems which is free, Ubuntu Pro on Google Cloud is not free. According to Google, Ubuntu Pro will cost 3%-4.5% of your average computing cost. Customers can purchase Ubuntu Pro through the GCP Console or Google Cloud Marketplace where they will receive a streamlined procurement process with access to the commercial features offered by Canonical.

      As Ubuntu Pro offers ten years of support, it means that users can use Ubuntu 16.04 LTS which, on the main track, reached end of life earlier this year. With more access to Ubuntu 16.04 via Ubuntu Pro on Google Cloud, companies will have more time to migrate over to Ubuntu 20.04 LTS.

    • By News Staff
      This 2021 Ultimate Google Workspace Certification Bundle is down to just $29.99
      by Steven Parker

      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can save 98% off the 2021 Ultimate Google Workspace Certification Bundle. Be the master of productivity and efficiency with 36 hours of content on Google Tools — Ads, Sheets, Trends, Apps Scripts, Analytics, and more!

      This bundle consists of 11 courses:

      Google Ads for Beginners 2020: Step-by-Step Process
      Set Up & Create a Google Ads Campaign from Scratch Following a Proven Strategy Google Apps Script Complete Course: New IDE (100+ Examples)
      Create Custom Functions within G Suite, Docs, Sheets, Gmail, Drive, Calendar, & More Google Chat & Meet: Beginner
      Initiate, Join, & Schedule Meetings Using Chat and Meet Go Fast with Google Sheets (Excel Alternative)
      Up Your Efficiency for a Shorter Work Day with 1 Hour of Instruction on Google's Alternative to MS Excel — Google Sheets Google Trends For Insane Growth for Your Business & Brand
      Make Better Business Decisions by Using Tailored Solutions & Free Online Data Tools Marketing Analytics in Google Data Studio
      Use Google Data Studio & Work with Web Performance Data Efficiently Google Analytics Course
      Understand Methods & Techniques for Measuring, Monitoring & Analyzing Web Traffic Google Docs Part Of G Suite: Learn Google Docs in 1 Day
      Master the Scope of Google Docs & See How Much Time You Can Save When Writing Documents Google Slides Presentations: A Free Alternative to Microsoft PowerPoint
      Design Beautiful Presentations Using Google Slides, a Free Microsoft PowerPoint Alternative Google My Business: Complete Listing Optimization Training
      See Step-by-Step How to Optimize a Live Google My Business Listing G Suite – Google Docs Introduction: Increase Productivity
      Tips & Demo of G Suite Google Docs to Help You Save Time and Get More Tasks Done The 2021 Ultimate Google Workspace Certification Bundle normally costs $2,189, but you can pick it up for just $29.99 for a limited time, that represents a saving of $2,159.01 (98%) off! For a full description, specs, and instructor info, click the link below.

      Get this deal, or learn more about it

      100 Entries to Win the Big Summer of Gaming Giveaway & Donate to Charity
      Over $5k of Gear from PlayStation, Xbox, Nintendo, Oculus, Sony & Bose.

      See full terms and description to enter -->

      Not for you?
      That's OK, there are other deals on offer you can check out here.

      Ivacy VPN - 5 year subscription at $87% off NordVPN - 2 year subscription at up to 68% off Private Internet Access VPN - subscriptions at up to 79% off Unlocator VPN or SmartDNS - unblock Geoblock with 7-day free trial Neowin Store for our preferred partners. Subscribe to Neowin - for $14 a year, or $28 a year for Ad-Free experience Giveaways: Polycade Home Arcade | $5K in cash | $10K in Crypto | Gaming Bundle Neowin Deals · Free eBooks · Neowin Store

      Disclosure: This is a StackCommerce deal or giveaway in partnership with Neowin; an account at StackCommerce is required to participate in any deals or giveaways. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through our branded deals site, and it all goes toward the running costs.

    • By Abhay V
      Google will skip the release of Chrome OS 95 to adjust to the new four-week release schedule
      by Abhay Venkatesh

      Earlier this year, Google announced that it was moving to a four-week release cycle for Chrome, shortening the duration between releases for consumers. The change is slated to be made with Chrome version 94. Today, the company announced its plans for Chrome OS and the release schedule changes coming to it.

      The company says that it will be moving Chrome OS to the four-week release cycle starting with version 96, which is expected to make it to users sometime in late November. Chrome version 94, on the other hand, is expected to roll out in the stable channel in the third week of September, with the corresponding Chrome OS version slated to release in the week of October 14. Keeping in mind these schedules, the search giant says that it will be skipping Chrome OS version 95 completely to “bridge the gap” between version 94 and 96.

      The firm also revealed that it will be introducing a new six-month update cadence for enterprise and educations users of the OS. This is likely aimed at focusing more on stability and security, and less on feature additions. The firm, however, has not provided much information in this regard. A similar eight-week Extended stable option is also planned for the browser.

      Google’s Marina Kazatcker adds: