• 0

google is showing wordpress sitemap in search results


Go to solution Solved by Hussam Al-tayeb,

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.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Abhay V
      Google announces new family-focused Assistant features
      by Abhay Venkatesh

      With Mother’s Day just around the corner, Google today announced a few new family-focused Assistant features rolling out to users. These include improvements to the Broadcast feature, new Family Bell reminders, and a few features specific to Assistant-powered smart displays.

      First up is an addition to Assistant’s Broadcast feature called Family Broadcast. The feature extends Broadcast’s capabilities to now include the ability to send updates to Google Family Group members across devices, extending beyond just smart home devices. For example, members in the group can receive updates on their mobile phones when they are away from home and can reply with a voice note.



      Another Assistant feature receiving new additions is the Family Bell reminder. For those unaware, Family Bell reminders are school bell-like time-specific reminders for various activities that can be scheduled via the assistant. The search giant is adding two new reminders for gardening and reminding kids to tidy up the room.

      Additionally, the feature is gaining the ability to ring across multiple smart home devices at once. The company says that users will soon be able to stop these bells by just saying “stop” without having to use the wake word. The firm is expanding the availability of the feature to eight new languages that include Dutch, French, German, Hindi, Italian, Japanese, Korean, Portuguese, and Spanish.



      Lastly, a few new kids-focused features include new stories such as Quidditch from Harry Potter and the “Who Was?” series from Penguin Random House. The company adds that users can listen to stories about Ida B. Wells, Ruth Bader Ginsburg and over 100 others. New games include trivia quizzes like “Are You Smarter than a 5th Grader”. There are also a couple of easter eggs for Mother’s Day with timers.



    • By Usama Jawad96
      Google wants you to imagine a future without passwords
      by Usama Jawad

      On the first Thursday of every May, "World Password Day" is celebrated annually to promote password management and cybersecurity practices in general. We already know that some organizations such as Microsoft want you to reduce dependency on passwords, but today, Google has announced a similar goal in a blog post titled "A simpler and safer future - without passwords".



      Google says that password management is a difficult process and even though it is recommended to keep long and complex passwords, this inevitably results in people sharing passwords across different websites. This essentially acts as a single point of failure where a compromise of one website's system means that all your accounts are under threat. To that end, the company is continuously investing in tools which make it easier to manage passwords right now, and eradicate them altogether in the future.

      Of course, the simplest way to protect your passwords is to have multilayered verification, and Google already supports this with two-step verification (2SV), where users can utilize their mobile devices to authenticate login attempts. Google has indicated that it will automatically start enrolling users into 2SV soon provided that their accounts are correctly configured. The company is further enhancing its security mechanisms by building security keys directly into Android devices and through apps like Smart Lock for iOS.

      Google pledges that while traditional forms of authentication like passwords remain common, it will continue to offer innovative products like Password Manager and Password Import that not only make password management easier but also makes passwords secure by default.

      Interestingly, while the company keeps hinting in its blog post that it wants you to imagine a world without passwords, it doesn't highlight any notable endeavors on this front. "One day, we hope stolen passwords will be a thing of the past, because passwords will be a thing of the past", says Google mysteriously, "but until then Google will continue to keep you and your passwords safe."

    • By indospot
      Android tablets are getting a new Entertainment Space for media consumption
      by João Carrasqueira



      Google has announced a new feature for Android tablets, called Entertainment Space. Inspired by last year's Kids Space that debuted alongside some Lenovo tablets, this new feature is designed to make it easier for users to browse and find shows, games, and books to pass the time.

      The Entertainment Space interface is split into three major tabs: Watch, Games, and Books, and each one does what you'd expect it to. In the Watch tab, users can view content from all the services they have accounts for. The interface will surface content from all the available services, including recommendations based on your history and the ability to quickly jump back into something you were watching before.

      The Games and Books tabs are a bit more limited in scope, since you can only rely on Google Play Games and Google Play Books. Each category will feature popular content at the time and highlight games you've playing or books you're currently reading. Some games also support Instant Play so you can get started without any downloads, while books offer free previews so you can know more about them before committing to a purchase.

      The Entertainment Space is coming to Walmart onn. tablets later this month, and tablets from other brands such as Lenovo and Sharp will also add it later in the year.

    • By Usama Jawad96
      Android Studio 4.2 is now live with support for multiple device deployment
      by Usama Jawad

      Android Studio is the go-to Integrated Development Environment (IDE) for developers building Android apps. This is why Google consistently releases updates to the software in multiple channels so that users can familiarize or report issues with the changes made before they are rolled out to the general public.

      Google rolled out Android Studio 4.1 back in October 2020, packing over 2,000 bug fixes and a bunch of new features. Now, Android Studio 4.2 has hit the stable release channel.

      First up, Google has noted that it realizes that it is sometimes difficult to upgrade apps to the latest version of the IDE, so it has included a new app upgrade assistant that streamlines this process and ensure that your app is taking advantage of new Android Gradle Plugin APIs. The Apply Changes utility has been enhanced so you can make more types of code changes and push them immediately without restarting the app when running on devices with Android 11+. Android Gradle Plugin 4.2 has a new resources compiler that enhances build performance on Windows machines. The default programming language has also been updated to Java version 8.

      Android Studio 4.2 is in line with the platform updates present in IntelliJ IDEA Community Edition 2020.2, which features a window showing problems in a centralized UI as well as a GitHub UI for pull requests. The IDE now supports Safe Args too which can be used for data encapsulation when utilizing JetPack Navigation. Autocompletion of code for Direction Args is present as well. The project and module wizards have received aesthetic updates to make it easier to find device and module types respectively.

      On the debugging side of things, the Database Inspector has been enhanced to work offline so you can diagnose your app's database even after a crash. A query history utility has been added too. The Retrace commandline tool has been made available as a standalone utility that allows you to deobfuscate method names and frames so stack traces are readable for humans.

      With respect to testing of apps, multiple device deployment is back in Android Studio 4.2, improving overall productivity. System trace has been enhanced to include an events table that shows CPU Core frequency and RSS memory counters, among other things.

      You can download Android Studio 4.2 from the stable channel here.

    • By Jay Bonggolto
      YouTube unveils new way to shop through connected TV ads from your phone
      by Jay Bonggolto

      YouTube today announced its new approach to advertising that will make it easier to shop on its video platform. It's called brand extensions, a new interactive experience that will let viewers learn more about a product they see on their connected TV screen with a single click on a button.

      The new ads experience was unveiled at Brandcast Delivered, YouTube's annual NewFront event that's now on its tenth year. Brand extensions are designed to conspicuously display an actionable button containing a website link, for example, in a TV ad. In the new ad format, there's a new "send to phone" button alongside the "Skip ad" button that will allow you to forward a website link to your phone. The new format is meant to minimize disruption to your viewing experience.

      After sending the promotion to your mobile device, you can then click on the link and shop for products. For brands, this format also allows them to gauge how many people interact with and buy their products directly in Google Ads.

      YouTube says the new feature is part of a broader effort to make connected TV ads "even more helpful for viewers and more engaging for brands". The video sharing service noted that this is only the first step in its effort to release interactive ads features. Brand extensions are rolling out later this year globally.