• 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 indospot
      Google's Nest devices can now help you find your iPhone
      by João Carrasqueira



      Google is introducing five new features for Google Assistant today, promising to make small day-to-day tasks easier. A notable one is the ability for Nest devices, like the new Nest Hub, to find your iPhone. You can ask the Google Assistant to find your phone, and it will ring it with a custom ringtone, even if the phone is set to silent or Do Not Disturb. You will need to enable notifications and critical alerts for the Google Home app on your iPhone, though.

      Another notable addition for the Assistant is more Duplex functionality on the web. If you remember, Duplex was initially shown off as a way for the Google Assistant to handle certain types of phone calls, such as making reservations at a restaurant, but in 2019, some of that intelligence was brought to the web, making it easier to buy movie tickets in the U.S.

      Now, it will also be making it easier to buy takeout and food delivery online. Basically, once you've chosen what you want to buy and hit the checkout button, the Assistant will navigate the website and fill in your payment and contact information automatically. For now, this will only work with select restaurant chains, though Google says it will expand to even more places across the U.S. later in the year.

      The other updates are arguably smaller in scope, but it's now possible to create Assistant routines based on the sunrise or sunset time in a specific location, such as turning on the lights in your home once the sun sets. Google will also start showing suggested actions in the Google Home and Assistant apps, which can help you come up with ideas for routines based on them.

      Finally, there's a new feature that lets you ask about this year's Oscars ceremony, such as nominees for individual categories and when the show is airing. Google didn't explain how this will make your day easier, though.

    • By Rich Woods
      TCL expands its 20 series with three new phones
      by Rich Woods

      TCL 20 Pro 5G Today, TCL is announcing three new smartphones as part of its 20 series, the TCL 20 Pro 5G, the TCL 20L, and the TCL 20L+. First up is the TCL 20 Pro 5G, which is at the top of the lineup with its Snapdragon 750G chipset that powers that 5G connectivity.

      It comes with a 6.67-inch AMOLED display, using TCL's NXTVISION 2.0 technology, also supporting HDR10 video playback for streaming your favorite shows on platforms like Netflix. It has a quad rear camera, although that includes a 5MP macro camera and a 2MP depth camera. The two cameras that actually count are the 48MP Sony IMX582 main sensor and the 16MP ultra-wide lens. It also comes with a 32MP front camera.

      TCL is promising a full day of battery life, and it supports wireless charging, something its predecessor did not do. It will be available tomorrow in the UK, Italy, and Portugal for €549 in Marine Blue and Moondust Gray.

      TCL 20L+“Our new 20 Series smartphones are outstanding examples of how TCL continues to deliver innovative technologies created to meet and exceed the needs of consumers,” said Stefan Streit, General Manager of Global Marketing at TCL Communication. “We’re constantly developing new mobile offerings designed to enhance the connection you have with your smartphone, especially while staying connected in a virtual or socially distanced world.”

      Next up is the TCL 20L+. It also comes with a 6.67-inch FHD display, and it's powered by a Snapdragon 662 chipset. On top of that, it comes with a 64MP main camera and an eight-megapixel ultra-wide sensor, along with two sticker-cams, meaning that they're 2MP sensors that only exist so OEMs can say they have a certain amount of cameras. It will be available tomorrow in the UK, Italy, and Portugal for €269 in Milky Way Grey and North Star Blue.

      Finally, the TCL 20L is more of a budget phone, also including a 6.67-inch FHD display, but with a 48MP camera. Coming in Luna Blue and Ellipse Black, it will be available in the UK, Italy, and Portugal tomorrow for €229.

    • By zikalify
      Vivaldi and Brave web browsers come out against Google's FLoC
      by Paul Hill



      Vivaldi has announced that it will be disabling Google’s new tracking feature FLoC in its browser to help protect users' privacy. It comes just a day after Brave announced that it’s doing the same. As both of these browsers use the same foundations as Google Chrome, they could technically ship with FLoC but neither will. The announcements come just days after DuckDuckGo announced an update to its Chrome extension that turns off FLoC in Chrome.

      When you browse the web, third-party cookies typically follow you around the web helping advertisers understand what things you’re interested in so they can better target ads making it more likely that you’ll buy a product. The level of tracking is unprecedented compared to older advertising methods and is now feeling the squeeze as more browser vendors and browser add-ons start blocking these cookies.

      As an alternative, Google suggested Federated Learning Cohorts (FLoC) which essentially groups people based on their browsing habits so that advertisers can show their ads to a group of people rather than individuals. While not as targeted as cookie-based ads, there remains some level of targeting.

      While FLoC makes it hard for third-party advertisers to figure out your individual browsing habits, Vivaldi reminds us that Google owns Chrome and runs an ad network and could therefore gain an advantage over competitors, further cementing its position.

      With FLoC being disabled in Vivaldi and Brave and not even shipping with Firefox or Safari, it does raise the question of whether Google will shelve the project altogether. If that happens, it will be back to the drawing board as stakeholders of the online world work out a way to serve privacy-friendly ads while still targeting those ads in some way.

    • By Rich Woods
      Microsoft's Surface Duo is coming to more European markets
      by Rich Woods

      Microsoft had its spring Surface announcement today, where it unveiled the Surface Laptop 4 and a bunch of peripherals like the Surface Headphones 2+. In the penultimate paragraph of the blog post, the firm mentioned that its Surface Duo smartphone is coming to business and education customers in more markets.

      Specifically, those regions include Austria, Belgium, Denmark, Finland, Ireland, Italy, Netherlands, Sweden, and Switzerland. And again, this applies specifically to business and educational customers, although presumably, consumers will still be able to get one through certain channels.

      You might not want to though. Microsoft released its dual-screen smartphone to customers in the United States in September, and even then, the hardware was a generation old with a Snapdragon 855 chipset and a lack of 5G. At this point, it's two generations old while still charging prices that put it on par with the latest from Apple and Samsung.

      Indeed, the business market probably just makes more sense for the aging hardware, as commercial customers tend to lean more towards long-term use than consumers do. There have already been reports of a second Surface Duo handset, so that's the one that consumers would want to wait for, assuming that Microsoft launches it in more markets like it does with the rest of Surface.

    • By Usama Jawad96
      Chrome 90 is here with an AV1 encoder and new augmented reality APIs
      by Usama Jawad

      Google released Chrome 89 over a month ago, offering a bunch of new features and improvements including enforcing developers to offer offline experiences for progressive web apps (PWAs) and new APIs for content sharing. Now Chrome 90 is here, headlined by enhancements such as support for read-only files in clipboard, a new AV1 encoder, and blocking of HTTP port 554.

      Chrome 90 includes an AV1 encoder that is optimized for video conference calls. The AV1 codec offers better compression efficiency which means that it will be very beneficial to users on networks with low bandwidth speeds.

      The browser will also be blocking port 554 for HTTP, HTTPS, or FTP servers as it has been used in some attack vectors. It is interesting to note that Chrome previously blocked this port too but unblocked it after backlash from enterprises. However, Google has once again decided to restrict connections via this port as its usage on Chrome's Dev channel is just 0.00003% of all requests.

      Other developer-facing improvements in Chrome 90 include allowing web applications to query device attributes, a CSS property for smoother interpolation between aspect ratios and two others for handling clipping margins, enhancements to certain HTML tags, as well as a shared superclass and constructor for ranges. Similarly, an API has been released that allows web components that make use of Shadow DOM to use server-side rendering (SSR) to reduce reliance on JavaScript and improve performance. Custom elements will also be able to expose their state using the state() pseudo class.

      WebAssembly now supports exception handling, and Chrome will now be placing protections against the application/x-protobuffer MIME type by adding it to the list maintained by Cross-Origin-Read-Blocking (CORB). The browser also used a content security policy directive to allow developers to disable Flash. But now that Flash is dead, this directive is being discontinued too. Furthermore, Chrome will manage file pieces which are downloaded out-of-order in a simplified way, making the job easier for web developers who previously had to write code for this themselves. WebAudio and file URL management techniques are also being changed to align with industry standards and offer better interoperability with other browsers.

      Over on the consumer-facing side of things, a significant addition is the ability to paste read-only files from the clipboard instead of having to rely on drag-and-drop. With respect to augmented reality (AR), sites can now use WebXR to query and estimate environmental lighting conditions to offer more natural effects. In the same vein, the WebXR Depth API allows calculation of environmental depth to enhance physics-based effects and occlusion.

      If Chrome on your device has not updated to version 90 automatically, head over to Help > About Google Chrome to trigger the update. Next up is Chrome 91 which is currently in the Dev channel, scheduled to hit Beta on April 22, with a Stable release expected on May 25.