• 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 News Staff
      Google Classroom: Teachers - Free Reference Card Download
      by Steven Parker

      Claim your Free Tips and Tricks Guide today, before this offer expires.



      This G Suite Google Classroom: Teachers reference provides shortcuts, tips, and tricks for this online software.



      Use this reference to brush up on the basics and to find alternative methods to your favorite commands. This printable quick reference is yours to use, distribute, and share at your organization!

      Along with this free reference card, you will also receive more information from CustomGuide regarding their innovative interactive training and learning solutions to help improve the software skills of you and your staff for success in today's workplace.

      How to get it
      Please ensure you read the terms and conditions to claim this offer. Complete and verifiable information is required in order to receive this free offer. If you have previously made use of these free offers, you will not need to re-register. While supplies last!

      >> Google Classroom: Teachers - Free Reference Card Download <<
      Offered by CustomGuide, view other free resources | Limited time offer

      Not for you?
      That's OK, there are other free eBooks on offer you can check out here, but be aware that these are all time-limited offers. If you are uncomfortable sharing your details with a third-party sponsor, we understand. Check out the Neowin Store for our preferred partners.



      Home Gym Giveaway | Ultimate Gaming Giveaway (feat. PlayStation 5 & Xbox Series X) Ivacy VPN - 5 year subscription for just $1 per month NordVPN - 2 year subscription at up to 68% off Private Internet Access VPN - subscriptions at up to 71% off Unlocator VPN or SmartDNS - unblock Geoblock with 7-day free trial Subscribe to Neowin - for $14 a year, or $28 a year for Ad-Free experience Disable Sponsored posts · Neowin Deals · Free eBooks · Neowin Store

      Disclosure: A valid email address is required to fulfill your request. Complete and verifiable information is required in order to receive this offer. By submitting a request, your information is subject to TradePub.com's Privacy Policy.

    • By indospot
      Hands-on with the ZTE Axon 20 5G and its disappearing camera
      by João Carrasqueira

      In December, ZTE launched the world's first commercially available smartphone with an under-display camera in markets around the world. The ZTE Axon 20 5G, as it's called, is a mid-range phone, but has the peculiarity of having a 32MP selfie camera hidden behind a small portion of the screen, and now we have our own review unit to take a look at. ZTE talks a lot about how it achieved this, using a combination of high-transparency materials, a special pixel matrix, AI algorithms, and more.

      The display itself is a 6.92-inch panel with fairly minimal bezels all around, since there's no camera, earpiece, or ambient light sensor on the bezel - it's all under the display. That panel has a resolution of 2460x1080 and a 90Hz refresh rate.

      In terms of internal specs, the Axon 20 5G comes with a Snapdragon 765G chipset that allows the phone to have 5G support, 8GB of RAM, and 128GB of internal storage. It also has a 4,220mAh battery to power the device, and that charges at 30W, which should get you up to 60% in 30 minutes or back to a full battery in 55 minutes.

      The ZTE Axon 20 5G is available in markets around the world for $449/€449/£419. While ZTE lists the price in U.S. dollars on its global website, it apparently can't deliver the phone to North America. You can check out our hands-on video below.

    • By zikalify
      Google to limit Chrome sync API following audit
      by Paul Hill



      Google has announced that it will be limiting access to private Chrome APIs that enable features such as Chrome sync and Click to Call so that only its browsers can use them. The decision follows an audit by the company which uncovered that third-party Chromium-based browsers were using the APIs.

      The web giant said that users of some third-party browsers were able to sign in to their Google Account and store and retrieve their Chrome sync data in their third-party browser. The data they could access includes bookmarks and presumably passwords. Google isn’t happy this is happening and has said that the APIs that enable these features will be restricted from March 15, 2021.

      For users that have already accessed these features, their data will still be available in their Google Account and will continue to be stored locally in their third-party browser. To continue using the restricted features, users will have no other option than to switch to Google Chrome or Chromium.

      Google Chrome’s Engineering Director Jochen Eisinger who authored the post did not share which browsers were using these APIs but Chromium has become an extraordinarily popular choice to build browsers on top of. Microsoft’s Edge, Opera, Vivaldi and Brave are some popular web browsers that are built atop of Chromium but they each have their independent syncing services.

    • By News Staff
      Save 96% off the Create Your Own Website with WordPress Master Class
      by Steven Parker

      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can save 96% off the Create Your Own Website with WordPress Master Class. Build a powerful website & launch it towards success with 7 hours of content on Facebook Ads plus WordPress eCommerce, blogging, and optimization.



      This bundle consists of the following courses:

      Facebook Ads: Marketing your WordPress Website's Products
      Facebook Crash Course Lets You Master the Art of WordPress Marketing WordPress Complete Website MasterClass
      Create a Professional Website & Preset Your Business Brand WordPress eCommerce: Convert Your Website Into an Online Store
      Learn How to Create an Ecommerce Online Store Even on Existing Website Creating WordPress Blog
      Learn How to Create WordPress Blog & Publish Articles WordPress Website Optimization & Technicals
      Optimize Your Website's Performance by Creating Professional Emails, Backups & More Good to know
      Certificate of completion included Updates included Length of time users can access this course: lifetime Redemption deadline: redeem your code within 30 days of purchase For a full description, specs, and terms, click here.

      Here's the deal:
      This Create Your Own Website with WordPress Master Class normally costs* $995, but you can pick it up for just $29.99 for a limited time - that represents a saving of $965.01 (96%) off.

      >> Get this deal, or learn more about it <<
      See all discounted Online Courses. This is a time-limited offer.
      Get $1 credit for every $25 spent · Give $10, Get $10 · 10% off for first-time buyers.

      Not for you?
      If this offer doesn't interest you, why not check out the following offers:



      Home Gym Giveaway | Ultimate Gaming Giveaway (feat. PlayStation 5 & Xbox Series X) Ivacy VPN - 5 year subscription for just $1 per month NordVPN - 2 year subscription at up to 68% off Private Internet Access VPN - subscriptions at up to 71% off Unlocator VPN or SmartDNS - unblock Geoblock with 7-day free trial Subscribe to Neowin - for $14 a year, or $28 a year for Ad-Free experience Disable Sponsored posts · 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 Steven P.
      Connect to your PC remotely with Chrome Remote Desktop from any device
      by Steven Parker



      Although Microsoft already has native support for Remote Desktop baked into Windows, their app forces the desktop on the client to resize all of the windows to "fit" on the device connecting to it, meaning when you come back to login on the desktop that you connected to remotely, all of the open apps will now be tiny windows on the screen, which is not great.

      Fortunately, Google has a free Remote Desktop app that lets you connect to a PC from any supported Android or iOS device and even through the web browser. It does require you to have the Chrome browser installed because it is a web app extension.

      Install the Chrome Remote Desktop Extension on the computer you want to connect to remotely Then go to https://remotedesktop.google.com/access/ to add the computer You will be prompted to give the computer a name and (at least) a six digit PIN Gallery: Setup Chrome Remote Desktop
      Once you have completed the above steps you will need to install the client on the device you will use to connect to your desktop.

      Install the Chrome Remote Desktop app on the device you will use to connect to the remote PC.
      Install for Android devices | Install for iOS devices Once the app is installed, tap on the hamburger menu and ensure you are signed in to the same account that the remote desktop is signed into Chrome with, tap the account to switch to it A list of your remote PCs will appear Tap on the remote desktop you want to access and enter the PIN

      When you connect, you will see the remote PC desktop in the orientation for your device, so portrait for a phone and tablet, you can switch to landscape view and pinch to zoom in or out to make it easier to control the remote PC. In addition, there is a top navigation bar that auto hides and lets you bring up a virtual keyboard, capture the mouse cursor as well as context menu options to send Ctrl-Alt-Del, resize the desktop to fit.

      Gallery: Mobile device access


      An added bonus is that this method to connect does not resize any opened windows on the PC, and it also does not lock your PC when a user is connected to it remotely, so anyone can watch along which also makes it perfect for remote assistance.

      Remote Assistance
      You can also opt to give someone a one-time access code to grant them access to provide Remote Assistance. However, this method only appears to be possible directly through the web browser at https://remotedesktop.google.com/support that lets you generate a code, or connect to a PC with a code.

      Let us know what remote solution you use for your computers in the comments below!