• 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
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 anmol112
      Apple's new tool will allow users to move iCloud Photos to Google Photos with ease
      by Anmol Mehrotra



      Apple has introduced a new tool that will allow iCloud users to migrate their data to Google Photos with ease. The tool will transfer all your photos and videos to Google Photos making it easier for users to migrate to Google's ecosystem.

      Apple notes that the transfer will take up to seven days during which the company will verify that the request was made by you and will transfer the data. The company also notes that the data will be copied to Google Photos so your backups on iCloud will not be altered. Furthermore, users will need to enable two-factor authentication on their Apple ID and make sure their Google account has enough storage available to complete the transfer.

      Once you have enabled two-factor authentication and cleared space on Google, you can send Apple a transfer request. To do that, head to privacy.apple.com and sign in with your Apple ID. Once logged in, select Transfer a copy of your data and follow the steps to transfer the data. Once requested, Apple may take up to seven days to complete the transfer. You can, however, check the status of the transfer at privacy.apple.com/account.

      Apple is doing a phased rollout of the service and it is currently available for users in Australia, Canada, the European Union, Iceland, Liechtenstein, New Zealand, Norway, Switzerland, the United Kingdom, and the United States.

      Currently, the transfer tool supports jpg, .png, .webp, .gif, some RAW files, .mpg, .mod, .mmv, .tod, .wmv, .asf, .avi, .divx, .mov, .m4v, .3gp, .3g2, .mp4, .m2t, .m2ts, .mts, and .mkv formats. The company further says that the filenames of albums and videos on Google Photos will start with "Copy of". Since Google supports 20,000 files per album, extra files will be transferred to Photos but will not be added to any album. Lastly, Apple warns that some files like shared albums, Smart Albums, live photos, some RAW files and metadata may not be transferred at all.

    • By Usama Jawad96
      Google says it will stop tracking you on the web via ads next year
      by Usama Jawad

      A major slice of revenue of revenue for Alphabet comes via its subsidiary company, Google. Similarly, a significant portion of Google's revenue comes via search and ads. To accomplish this, the firm uses third-party cookies and trackers to identify user activity across the web, in order to present personalized ads and other suggestions.

      However, this is now changing as Google has announced that it will soon stop tracking you on the web.



      This follows Google's announcement from earlier this month that it is phasing out support for third-party cookies. This is a part of the endeavor to make the web privacy-first. To that end, Google has confirmed that once cookies are phased out, it will not be building any identifiers at all to track user activity either across the web or in its products.

      The company has clarified that while other competitors may build alternative solutions such as PII graphs based on email addresses, it will not engage in the practice as it's not likely to meet the demands for user privacy. Instead, it will shift focus to privacy-preserving APIs which still deliver relevant results to advertisers without tracking individuals separately.

      Google says that:

      The company notes that it will still work to strengthen connections between customers and brands but these do not have to come at the cost of user privacy. While third-party cookies will be phased out within two years, you can read more about privacy-preserving APIs on GitHub here.

    • By Rich Woods
      Google rolls out minor update for Android 12 developer preview
      by Rich Woods

      Just like it did last year, and almost to the day, Google is releasing a minor update for its Android 12 developer preview, calling it developer preview 1.1. And just like last time, it's packed with fixes instead of features, but if you're running the Android 12 preview, you're probably going to want to install it.

      Here's the full list of fixes:

      As for what's coming in Android 12 on the front-facing end of things, there's not a whole lot right now. Notifications are changing, and they're going to get faster, and there are some subtle visual changes in apps like Settings. What's more interesting is the stuff that's hidden, such as a conversation widget, wallpaper-based theming, and more.

      If you're already on the Android 12 developer preview, you're going to get this update as an OTA. If not, you can check out our guide to get started.

    • By Usama Jawad96
      Google is adding more metrics on Play Console for better analysis of app performance
      by Usama Jawad

      Google updates its Play Console from time to time. It serves as a centralized portal for developers to deploy their apps, monitor their performance, identify trends, and manage releases, among other things. Now, the company has introduced a set of new metrics and benchmarks so developers can better analyze their app's store performance.



      This update essentially enables developers to better understand their apps' usage and identify opportunities to improve. It features new metrics as well as benchmarks to compare your app against. Some of these new metrics include the ratio between daily active users (DAUs) and monthly active users (MAUs), their individual growth rates, 28-day returning users, average purchase value, average revenue per daily active user (ARPDAU), and purchases per buyer, among others.

      The stats page now also presents visuals which draw comparisons from peersets of apps and games from 250 categories such as "Comics" and "Audiobooks". You can further filter these by region to get more granular metrics to benchmark against your own apps. Google has noted that:

      Google has stated that this is only the first step in a multi-year effort aimed at bringing more insights to all developers, and the company will be looking to expand these capabilities in the future.

    • By Usama Jawad96
      Google starts enforcing offline experiences for installable PWAs in Chrome 89
      by Usama Jawad

      Google continually updates its Chrome browser to offer new features and enhancements to users. For example, a major change in Chrome 88 was that it featured better password protection. Apart from making customer-facing changes, the company also updates its software to make it easier for developers to offer new capabilities in the browser.

      Now, Google has rolled out Chrome 89 in the stable channel. It contains multiple enhancements to the developer and, subsequently, user experience.

      A major change in Chrome 89 is that Google has started warning developers to offer offline experiences with their installable Progress Web Apps (PWAs). Previously, developers were able to skirt this condition in some cases but now Google will be cautioning developers in DevTools in the Issues tab, and will begin enforcing it as a mandatory requirement of the PWA installability criteria from Chrome 93 later this year. This change does not affect developers who already offer offline experiences for their installable PWAs.

      WebHID, WebNFC, and Web Serial have hit the stable channel on Chrome as well. These APIs allow website developers and hardware manufacturers to create engaging experiences between the two platforms with minimal lines of code. This also removes certain dependencies on driver updates and software installation when you get a new piece of hardware you'd like to link to a webpage on Chrome.

      Another significant addition to Chrome 89 is the availability of Web Share and Web Share Target APIs for desktop. These enable users to share their content to other apps on the device. For example, a user will be able to share photos from Google Photos to Twitter. This capability was already available on mobile, but has now made its way to Chrome OS and Windows as well.

      Other minor changes include enhancements to JavaScript modules, and updating the omnibox icon for installable PWAs. If Google Chrome on your device has not updated to version 89 already, you can head over to the dedicated page here to find out how to manually trigger the update.