• 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
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.

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
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 News Staff
      Save 98% off this 2021 Google SEO & SERP Business Marketing Bundle
      by Steven Parker

      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can save 98% off this 2021 Google SEO & SERP Business Marketing Bundle. This 26 hours of content on social media marketing, link building, Google citations and more help boost your brand's lead and traffic online.

      This bundle includes the following courses:

      2021 SEO & Social Media Marketing Strategies To Reach 1,000,000 People
      Learn Effective Marketing Strategies for Branding, Sales, and Traffic Growth Link Building 2021: Google SEO #1 Ranking Tactic (Backlinks)
      Get Amazing Backlinks from Authoritative, High-Quality Sites Using Top SEO Link Building Strategies Voice Search SEO for Local Business & Ecommerce Products
      Target Different Searches Made Through Voice to Get More Traffic & Rank Higher in Google Google Citations 2021: Boost SEO for New Local Websites
      Learn How to Boost Your Search Engine Marketing, Traffic & Clients in Less Than an Hour Advanced SEO 2021: Rank in All 10 Google Search Results (SERPS)
      Learn Intelligent SEO Strategies to Drown Out Your Competitors by Ranking in All 10 Google Search Results Image SEO On Your Website & Google Images
      Optimize Beginner to Advance Image for SEO Technical SEO 2021: Rich & Featured Snippets + HTML Schema
      Have Your Website Search Results Show Up as Rich Snippets with Higher Click-Throughs Using Microformats Technical SEO 2021: 2-Second Website Load Speed In 1 Day
      Make a Faster Website with Technical SEO, UX Design & Web Development Using GTMetrix, Google Lighthouse, and More Advanced Marketing Strategy 2021: Recommendation Engine Algorithms
      Get Traffic & Sales Growth from Recommendation Algorithms on Markeplaces Like Amazon, YouTube & More Advanced SEO Keyword Research 2021
      Solve Common SEO Problems & Have Your Page Rank in Google Search Perfect On-Page SEO in 1 Day That Users & Google Will Love
      Quickly Rank Your Website for Top Keywords with On-Page SEO What's the deal?
      This 2021 Google SEO & SERP Business Marketing Bundle normally costs* $2,189, but you can pick it up for just $34.98 for a limited time - that represents a saving of $2,154.02 (98%). For a full description, specs, and instructor info click the link below.

      Get the Google SEO & SERP Business Marketing Bundle
      Not for you?
      That's OK, there are other deals on offer you can check out here.

      Ivacy VPN - 5 years at 87% off NordVPN - 2 years 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 Jay Bonggolto
      Chromebooks gain new security and accessibility updates for remote learning
      by Jay Bonggolto

      Google launched a faster way to sign into some websites with Chrome OS earlier this year without using the password you've created for those sites. Thanks to the company's Web Authentication (WebAuthn) feature, you can log into supported websites using the PIN or your fingerprint you've used to sign in to your Chromebook.

      Today, Google announced that it's bringing the ability to log into a Chromebook using a six-digit PIN to education users. The feature will be available starting in August on devices powered by an H1 security chip. You'll be prompted to set up a PIN when you sign into your assigned device. The search giant noted that the new update is meant to support students as they participate in remote classes using the devices assigned by their schools.

      Google is also rolling out a new accessibility update in August that will allow students to choose a certain point on their screen with the new Point Scanning navigation mode. It's part of the Switch Access input method for Chromebook that allows users to control their cursor using a built-in keyboard or an external device that connects via USB or Bluetooth. To use this feature, you need to select the horizontal location of your choice first and then choose the vertical location.

      In addition, Chrome OS has added a new panning method to its full-screen magnifier that lets you keep the mouse at the center of the screen as the viewport pans with the mouse's movement. Previously, you could only pan the screen when the mouse reaches the edge of the magnified viewport.

      Google also released new tutorials for its screen reader ChromeVox. These include a quick orientation and interactive lessons. A new page is also added in the admin console to display the Chrome Insights Reports, which show the Automatic Update Expiration date of a device.

    • By zikalify
      EU Commission launches Google antitrust probe over its ad serving
      by Paul Hill

      The European Commission has announced that it has opened a formal antitrust investigation into Google to find out whether it favoured its own online display advertising technology services over the competition's ad tech to the detriment of other providers, advertisers, and online publishers.

      The Commission will look at a whole range of issues that it’s concerned about in relation to Google's ad practices, but one of the most high-profile items on its list pertains to Chrome’s Privacy Sandbox that will prohibit the use of third-party cookies in favour of Google’s federated cohorts alternative which could hurt other ad providers’ ability to target relevant ads at users.

      Google has previously announced that it would prevent third-party advertisers from accessing the advertising identifier on Android if the user decides to opt out of personalised advertising. In its investigation, the EU Commission will examine the effects of this policy on online display advertising and online display advertising intermediation markets.

      Commenting on the decision to launch the probe, Executive Vice-President Margrethe Vestager, said:

      The Commission has said that it will take into account the GDPR rules which help users maintain their privacy online and that this investigation seeks to ensure that Google is competing fairly with other firms. It said that this “in-depth investigation” will now be carried out as a matter of priority but didn’t state how long it’ll take.

    • By Abhay V
      Microsoft is issuing DMCA complaints to take down leaked "Windows 11 ISO" links
      by Abhay Venkatesh

      Earlier this week, a Windows 11 ISO for build 21996.1 leaked to the web, letting users try out the yet-to-be-announced offering from Microsoft. The build that seems to have been compiled late in May provides a first look at what the Redmond giant is teasing to be the “next generation of Windows”.

      As the leaked build does not paint the complete picture of the OS update owing to it being a pre-release version – one that hasn’t even been released to Insiders –, Microsoft seems to want to restrict users from downloading it, which is why it is issuing DMCA complaints to Google (spotted by Fossbytes) in some regions asking the search giant to take down results containing articles from publications with links to the ISO files. Interestingly, in the linked Microsoft Japan complaint, the firm does confirm the Windows 11 name as it is requesting for the removal of “Windows 11” ISOs, claiming that those are leaked copies of “the unreleased Windows 11” OS.

      The company is slated to hold a dedicated event to show off Windows 11 on June 24, and it probably (and understandably) wants users and enthusiasts to reserve their judgement about the upcoming update till it is officially unveiled. Components such as the Microsoft Store, which is said to be receiving a major refresh, are yet to be shown off or talked about. Additionally, the leaked version lacks other improvements that will likely be served through the way of Feature Experience Packs that can be delivered without the need for an OS update, something that is currently being targeted only to internal employees.

      There is also a lot that is unknown, such as whether there will be a separate update to Windows 10 this fall (version 21H2) and what the update and support lifecycles look like for Windows 11. What seems to be increasingly certain is the ‘Windows 11’ branding, which is present in the About Windows (winver) pop-up, setup process, and even in the DMCA notices.

    • By Jay Bonggolto
      YouTube for iOS adds support for picture-in-picture mode in the US
      by Jay Bonggolto

      YouTube confirmed today that it has started rolling out support for picture-in-picture (PiP) mode to its iOS app in the U.S. The feature is available initially to premium subscribers, with a wider release for everyone in the country scheduled soon.

      The feature offers a nifty option to watch a video in a small pop-up window on top of other tasks you want to do on your device at the same time. It comes in handy for occasions when you want to open your email, for example, and continue watching a video on the app at the same time. You can do so simply by playing a video in the app and then tapping the home button. The video will then shrink into a smaller player.

      It has been available for quite sometime now, although it's limited only to certain platforms. For example, the capability was released to YouTube users on Android 8.0 Oreo for free in the U.S. back in 2018 after exclusively launching on YouTube's premium version.

      Apple also introduced support for PiP when it announced iOS 14 in June of last year, allowing YouTube's mobile site users to watch a video on Safari on top of other tasks. However, that capability vanished in September 2020 for non-premium YouTube members. It was reinstated a month later on the service's mobile site for those users.

      Source: MacRumors