• 0

google is showing wordpress sitemap in search results



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"

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

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

Any other way to do it?


*Edited for better wording*

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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 comment
Share on other sites

  • 0

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 comment
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 Chandrakant
      India's regulators accuse Google of abusing its Android clout to stifle the competition
      by Chandrakant Isi

      Search giant Google has been making headlines for not-so-flattering reasons. In the latest round, India's anti-trust regulator has accused Google of using its Android dominance and "huge financial muscle" to hold back the rivals.

      The Competition Commission of India (CCI) further adds that Google reduced "the ability and incentive of device manufacturers to develop and sell devices operating on alternative versions of Android." It also called out Google Play Store policies as "one-sided, ambiguous, vague, biased and arbitrary."

      Indian authorities have compiled an elaborate 750-page report over the last two years. During the investigation, CCI questioned around 62 Google competitors and partners including Amazon, Microsoft, Apple, Samsung, and Xiaomi.

      As per Statista, India has roughly over 740 million smartphones. Out of which, 98 percent of devices are based on Google's Android platform. The CCI considers Google's mandatory installation of its core apps as an unfair condition for hardware manufacturers in violation of Indian laws.

      According to Reuters, the US-based company will be given a chance to defend itself before the verdict. Commenting on the development, Google has made a counterargument claiming that "Android has led to more competition and innovation, not less." It is planning to work with the CCI to put forth its side.

      In India, the search giant has also been under the scanner for abusing its market position to promote its mobile payments app. Moreover, Indian regulatory authorities are investigating the charges that accused Google of using its agreement terms to block companies from using a modified version of Android on their TVs.

      Recently, the South Korean anti-trust regulator concluded that Google used its clout to hinder the development of Android forks. Along with a $177 million penalty, the Korea Fair Trade Commission (KFTC) also blocked Google from imposing an "anti-fragmentation agreement (AFA)" on smartphone makers. However, the $177 million fine is a chump change for a company that netted over $182 billion revenue in 2020.

      In the past, Google has got away with more shady things such as stealing personal data such as emails, passwords, and more via its fleet of Street View cars in multiple countries. If that wasn't bad enough, later it didn't even bother to delete the data despite promising to do so. Hence, don't be surprised if Google once again gets away with a slap of its wrist.

      Source: Reuters; Image Credit: James Belkevits

    • By hellowalkman
      Microsoft's Bing might soon replace Google as the default Firefox search engine
      by Sayan Sen

      Mozilla is currently testing Microsoft's Bing as the default search engine for Firefox according to its latest SUMO study announcement for the month of September. The post states that since the 6th of this month, about 1% of the total Firefox desktop user base has been subjected to this early testing. Mozilla expects this testing phase to continue for about five months and be completed by January next year.

      For those unfamiliar, SUMO stands for SUpport.MOzilla.org and according to the browser giant, these studies are "a part of optimizing the Firefox experience" for all users. A list of "Completed studies" is available for viewing if you run "about:studies" in the browser's address bar.

      While we aren't sure why Mozilla may want to replace Google as the default search engine for Firefox with Bing, German blogger Sören Hentzschel speculates that the Mozilla team could be experimenting with Microsoft's Bing for the future as the current Mozilla-Google search deal is expected to end next year. So Bing might be the safety net for Mozilla in case the search contract with Google isn't extended further.

      Via: Sören Hentzschel

    • By Usama Jawad96
      Google commits to solving security problems in open-source projects like Git and Laravel
      by Usama Jawad

      After a meeting with U.S. President Joe Biden a few weeks ago, Google announced that it is pledging $100 million towards improving security in open-source projects. Today, it has revealed that it is partnering with the Open Source Technology Improvement Fund (OSTIF) to do just that. Together, the two entities will launch the Managed Audit Program (MAP). Through this initiative, they will increase the depth of security reviews and audits of open-source projects that are widely used by people all over the world.

      For now, Google has committed to manage security priorities and help fix flaws in eight open-source projects. These are:

      Git Lodash Laravel Slf4j Jackson-core Jackson-databind Httpcomponents-core Httpcomponents-client Commenting on the partnership, OSTIF had the following to say:

      It is important to note that the initial list of MAP projects has 24 items, and they contain notable entries like Electron, React Native, Rails, Joomla, and Angular too. However, they will likely be included in subsequent rounds of MAP as funding for them has not been secured yet.

    • By zikalify
      Google's Grace Hopper subsea Atlantic cable lands in the UK
      by Paul Hill

      Google has announced that its Grace Hopper subsea cable has landed in the UK from the U.S., just days after connecting Spain to the U.S. too. According to the search giant, the new cable will improve the resilience of the Google network that provides its consumer and enterprise products.

      The company said that Grace Hopper is the first Google-funded cable to connect to the UK. It said that it recognises the importance of technology in the country, noting its contribution to the economy has been growing around 7% year on year since 2016. By strengthening its network, the tech sector in the country, which has grown 40% in the last two years, will benefit. Not only that, but 10% of all job vacancies in the UK are in tech roles.

      Commenting on Grace Hopper, Jayne Stowell, Strategic Negotiator, Global Infrastructure, Google Cloud, said:

      One of the interesting things about Grace Hopper is its use of switching architecture that provides network flexibility and resilience to protect against failures and unexpected traffic patterns. Once the cable is switched on, you should expect a more reliable Google services experience.

    • By Usama Jawad96
      You no longer need a password to sign in to your Microsoft account
      by Usama Jawad

      From time to time, Microsoft announces that passwords are on the way out and that alternative authentication methods such as biometric scans, verification codes, security keys, and Authenticator apps are the way forward. This is a sentiment echoed by Google as well. Today, Microsoft has made good on this promise, and announced that you no longer need a password to sign in to your account.

      Microsoft has cited a number of issues with the use of passwords, including inconvenience, insecurity, and the fact that a fair share of people simply give up on using a service rather than going through the password reset process.

      Starting today, you can remove a password completely from your Microsoft account and instead sign in to the company's services using alternative authentication methods such as Windows Hello, security keys, verification codes, or the Microsoft Authenticator app. The Redmond tech giant says that passwords are highly susceptible to malicious attacks, as people simply reuse them across accounts or utilize simplistic formulas for creating new passwords. These are relatively easy to guess for hackers who can utilize password spray attacks and phishing to gain access to vulnerable accounts. Indeed, even the UK government recently advised the public to use unique passwords that are a combination of three random words rather than thinking up complex passwords or reusing an existing one.

      In order to go truly passwordless on your Microsoft account, the tech firm has stated that you should first install the Microsoft Authenticator app and link it to your account. After that, head over to the portal here, and select Advanced Security Options > Additional Security > Passwordless Account > Turn on. On completion of the on-screen prompts, you will be shown a notification saying that "you have increased the security of your account and improved your sign-in experience by removing your password."

      You can reconfigure your account to use passwords if you want, but the messaging from Microsoft is clear: It really wants to kill off passwords, and soon. The change will start rolling out today and will be available to all within the next few weeks.

      Microsoft has noted that the capability is only available for consumer accounts right now but work is being done to offer the same for enterprise accounts utilizing Azure Active Directory (AAD). As usual, admin configurations to toggle this behavior will be available too.