• 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By indospot
      Mozilla is worried about being collateral damage in Google's antitrust case
      by João Carrasqueira

      Yesterday, the United States Department of Justice filed an antitrust lawsuit against Google, accusing the search giant of monopolistic practices to maintain its dominant position in the search market. Among the practices brought up in the case is the fact that Google pays to be in the default search engine on some devices and web browsers, such as Mozilla Firefox.

      In response to the lawsuit, Mozilla has issued a statement regarding the accusations. The blog post opens by saying that Mozilla believes that scrutiny of these practices is important in order to "build a better internet".

      However, the organization follows up by bringing up the search agreement between Google and Mozilla, which allows Google to be the default search engine in Firefox. Mozilla says it's one of the organizations that's best positioned to drive competition on the web, and that the lawsuit shouldn't cause collateral damage to smaller and independent companies like Mozilla.

      Back in August, Mozilla and Google reportedly renewed their search agreement deal, which ZDNet estimated to be worth between $400 million and $450 million. This was shortly after Mozilla announced it would be laying off 250 employees as part of corporate restructuring, so it's apparent that Mozilla heavily relies on funding from this search agreement.

      Mozilla says it's still looking into the details of the lawsuit, and it will share updates on the case as more information comes. It'll be interesting to see if and how the lawsuit will be able to protect the interests of smaller organizations like Mozilla while putting a stop to Google's practices.

    • By Copernic
      Google Chrome 86.0.4240.111 (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 32-bit | 62.5 MB
      Download: Google Chrome Offline Installer 64-bit | 64.5 MB
      Download: Google Chrome MSI Installers for Windows (automatic update)
      View: Chrome Website | v86.0.4240.111 Release Notes

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

    • By Usman Khan Lodhi
      You can get your phone fixed without having to leave your home thanks to uBreakiFix
      by Usman Khan Lodhi

      uBreakiFix, an electronics repair service, is launching its "We Come to You" mobile repair program across the U.S., in which the company's services are brought to customers' doors rather than the other way around. It also offered free Google Pixel repairs to frontline workers earlier this year. A fleet of more than 640 repair vehicles has been deputed to handle repairs, which include screen repair and battery replacement, in two hours or less.

      Appointments can be booked as soon as the same day, and visits can be arranged for places other than your home, as long as the place is in an eligible zip code. Customers may take note that the vehicles won't offer a full range of repairs that they can get at a brick-and-mortar location. For now, only a handful of repair types are supported, with the firm planning to expand the program for more types of devices and services in the future. To secure appointments, there is a $30 non-refundable fee.

      Though the launch has been announced nationwide, it isn't available in every market yet, with the firm planning to add 700 vehicles by the end of the year and extending the program to Canada. To check if these mobile repairs are available in your area, head over to this page, and input your zip code.

    • By Jay Bonggolto
      Google announces new AI-powered photo printing service for $6.99 per month
      by Jay Bonggolto

      Google today introduced a premium printing service that costs $6.99 a month to have your pictures in Google Photos printed and delivered to your doorstep. The search giant will use artificial intelligence to automatically pick 10 of your photos for printing every month. The subscription service is only available in the United States, despite printing being offered in other markets.

      For your monthly deliveries, the premium print series provides some options to give you control over the design of your prints. For example, you can select a matte or glossy finish. It will also let you add a border to your images before printing or change your photo selection. And in case there's not much that has happened in a given month, you can choose to skip a delivery or have it canceled entirely.

      The service also offers a postcard print option for your photos using a cardstock paper material for longevity. Google is rolling out the premium print series in the coming weeks.

      In addition, you can now order photo prints through Photos for same-day pickup at Walgreens. Print sizes available are 4x6, 5x7, and 8x10. Google says the addition of Walgreens to its same-day printing service along with CVS and Walmart "nearly doubles the total number of stores available for same-day prints".

    • By Usman Khan Lodhi
      Portrait Light in Google Photos is making its way to older Pixels
      by Usman Khan Lodhi

      When Google launched the Pixel 5 and the Pixel 4a 5G, it announced a plethora of improvements for Google Photos, exclusive to the newly-released phones. One of the salient additions for the Pixel 5 was the Portrait Light feature, which lets users tweak and adjust the lighting on portraits and even allows for moving around the light source, helping fix shadows or uneven lighting on faces.

      Now, these effects are making their way to older Pixel phones dating as far back as the Pixel 2 family, according to Android Police. The feature is being made available through a server-side update, which means users won't be required to update the app.

      Portrait Light is available in the new Photos interface and can be accessed by heading over to the Adjust option and selecting Portrait Light when editing an image.

      Once Portrait Light is available on older Pixel devices, it can only be triggered on photos of humans. It doesn't necessarily require the photo to be taken in Portrait mode, but rather a shot that contains a single person. Users cannot force enable the feature in case the app makes a mistake and fails to detect faces in the frame..

      So far, the feature has reportedly begun showing up on Google Photos version on Pixel 2 XL, Pixel 3a, Pixel 4a, and Pixel 4 XL models. Based on our testing, Portrait Light effects have not made their way to first-gen Pixels yet. It is possible that the feature will not be made available to that device owing to the phone no longer being supported.

      Source: Android Police