• 0

google is showing wordpress sitemap in search results


 Share

Question

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"
</FilesMatch>

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

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

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By zikalify
      Google's Pixel 6 series will feature a custom-built SoC dubbed Tensor
      by Paul Hill



      Google has announced that its upcoming Pixel 6 and Pixel 6 Pro will feature a custom-built System on a Chip (SoC) called Tensor. The rationale behind Tensor is that existing hardware limits Google’s ability to maximise the potential of artificial intelligence (AI) and machine learning (ML); with Tensor it’s able to overcome these issues.

      Over the last few years, Google has been going in heavy on AI. With the new Tensor chip, Google says Pixel 6 and Pixel 6 Pro users will gain new features and improvements in translation, captioning, and dictation that presumably won’t be available on other devices, it also helps the device run more smoothly in general. It will also offer users better security with a new security core and the Titan M2 chip – the search giant says these features will mean the new devices have the most layers of hardware security compared to any other phone.

      Aside from announcing the new Tensor SoC, Google took some time to address the camera hump that’s present on the upcoming devices. It said that the improved sensors and lenses are simply too big to fit into a traditional square so it has had to introduce a new design which it calls the camera bar. In a thread on Twitter, the firm said the Pixel 6 Pro has three cameras including a telephoto lens with 4x optical zoom, while the Pixel 6 has the same cameras minus the telephoto lens.



      Users will be able to pick up the Pixel 6 and Pixel 6 Pro in three colour combinations and they both use new materials and finishes including a light polished aluminum frame and a matte aluminum finish.

      Google hasn’t shared any pricing information with us, or when it will go on sale but prospective buyers should expect it to be available around October.

    • By Fiza Ali
      Google sends out new invites to join the Pixel Superfans community
      by Fiza Ali



      Made by Google recently released a new series of invites to join "Pixel Superfans". The invite to join Google's Pixel Superfans community was sent out through the standard googlepixel-noreply@gmail.com address employed for promoting the latest products and quarterly Feature Drops.

      The message markets "access to special Google events". Among the numerous past events, one was a tour of Google Store Chelsea a day before it opened. In Mountain View, the company also hosted a "special Pixel event" the day after Made by Google 2019 where people got to meet with "the people behind it."

      Perks are also promoted with Superfans last year receiving deconstructed Pixel 4a, 4a 5G, and 5 prints as holiday gifts. In the end, the email mentions Q&A sessions with product teams and the "opportunity to tell [Google] what matters most to you".

      The email sent out this week links to a form that asks what Made by Google products you have owned, among several other questions. The options for this question include Stadia, Google/Nest Wifi, Chromecast, and Nest Smart Displays, and Home speakers.

      The basis for joining has not been disclosed yet; however, there is a possibility that it could be based on how many Pixel phones you have owned.

      Source: 9to5Google

    • By Jay Bonggolto
      Chrome Canary now lets you open bookmark folders as tab groups
      by Jay Bonggolto

      The ability to group tabs in Google Chrome has been one of the nifty features added to the browser over the past few years, giving users some sort of relief when opening multiple tabs at the same time. Now, the browser's Canary channel has gained a new capability that should further make managing tabs in Chrome a breeze.

      Chrome Canary has apparently added a new feature designed to let you open bookmark folders as tab groups, as per Reddit user Leopeva64-2. With this capability, you can right-click a bookmarks folder and then open all links saved in it as a tab group. After doing that, you will see the bubble that allows you to change the tab group's name and color label.



      There is another change that the Redditor discovered in Chrome Canary, and it adds a convenient way to restore tabs opened in groups from the history menu. The current Chrome Canary version displays the individual tabs in the history menu after restarting the browser. This means it's impossible to view the tabs that were previously sorted in a group. Now, if you want to reopen a tab group with a single click, you can do so with the latest change to Chrome Canary.

      The latest change came to light a month ago after the same Redditor revealed that Chrome Canary was adding the ability to save and sync tab groups as well as pinning them.

    • By Fiza Ali
      Apple removes Unjected, a dating app for the unvaccinated, over anti-vax content
      by Fiza Ali



      Apple has removed a hybrid social and dating app for the unvaccinated, Unjected, saying that it referenced the themes and concepts of the COVID-19 pandemic "inappropriately". Unjected describes itself as a platform that provides users space where they can match with other users who support "medical autonomy and free speech". The founders of the dating app are also involved in a conflict with Google regarding their Android app.

      The site reportedly contained false claims that vaccines produced for COVID-19 have the potential to serve as bio-weapons, connect to 5G, and modify genes. Google sent Unjected a notice on the 16th of July to remove false claims and misleading information from the site within two weeks to prevent a Play Store ban. Upon this notice, the developers removed the social feed but Shelby Thompson, co-creator of the app, stated that Unjected would restore both the false claims and the feed, and will not comply with the request.

      The app also has an account on Instagram where it supports its perspective on freedom and does not refrain from propagating misleading posts like claiming that mRNA vaccines alter DNA in spite of Instagram's anti-misinformation stance.

      Apple and Google have made it clear through their crackdown that they won't permit apps that allow anti-vax content. The former also claimed that the app encouraged its users to utilize shady tactics to avoid Apple's regulations, and that is also reason enough to ban Unjected from the App Store.

      Source: Bloomberg (paywall) via Engadget

    • By Fiza Ali
      Google brings Play and Watch bundle for $99.99 with Stadia Controller and Chromecast
      by Fiza Ali



      Google has combined Stadia Controller and the 2020 Chromecast to form a bundle, naming it the Play and Watch package. In this bundle, users can get both the streaming dongle and controller for $99.99.

      The store description for the product reads:

      This package also saves users $19 that they would have to spend if they buy both products separately. Along with the package, Google is also recommending the Chromecast Ethernet adapter to get the best out of your Stadia experience. The new Chromecast is available in Sky, Sunrise, and Snow for $49.99, and the Controller is available in Wasabi, Just Black, and Clearly White for $69.

      If users buy a Chromecast Ethernet adapter with Play and Watch with Google TV package, they will be saving an additional $10 and getting the recommended accessory for only $9.99. Google is also giving discounts on its Stadia Premiere Edition bundle and making it available for purchase for $79.99 after a $20 price cut. However, the streaming dongle included is not available for sale anymore which suggests that Google is running down inventory.

      Google's game streaming service now comes with support for limited Android TV products too. As such, users can enjoy it with their compatible third-party Bluetooth gamepad or Google's Controller.

      Source: 9to5Google via The Verge