• 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 Jay Bonggolto
      YouTube launches $100 million fund to pay Shorts creators until 2022
      by Jay Bonggolto

      YouTube's monetization opportunity has helped content creators earn more than $30 billion over the past three years. Now, the video sharing service is extending that opportunity to those who create engaging content on Shorts.

      Shorts is, of course, YouTube's TikTok rival and it's getting a huge financial support to help boost the creation of original content on the short-form video platform. YouTube announced today a $100 million fund to reward Shorts creators who produce viral content over the period of 2021 and 2022. To scout for creators who are eligible to receive funding, YouTube will reach out to thousands of creators every month if their videos surpass certain engagement milestones.

      The fund is also open to everyone, including those who are not members of the YouTube Partner Program. However, YouTube didn't reveal how it would pick creators to qualify for the program or what specific milestones they need to achieve to receive funding. The service only vowed to share more details over the coming months when the fund's release inches closer.

      TikTok unveiled a similar effort last year, promising to dole out $200 million to creators who meet its requirements including having at least 100,000 authentic views in the last 30 days. That fund was also expected to grow to more than $1 billion in the U.S. in the next three years, making it a tough contender for YouTube's new program.

      In addition to the new fund, YouTube also announced new Shorts features it's been working on, such as the ability to automatically add captions to Shorts, record up to 60 seconds with the Shorts camera, correct the color of videos, and insert clips from your phone’s gallery to your videos. YouTube will also begin to test ads for Shorts and roll out the new “remix audio” feature to creators after its preview earlier this year.

    • By zikalify
      Remittance payments arrive on Google Pay in the U.S.
      by Paul Hill

      Google has announced that Google Pay users in the United States can now send remittance payments to users in India and Singapore. By the end of the year, it expects that the number of recipient countries and territories will rise to 280. The feature is enabled through integrations with Western Union and Wise (formerly TransferWise).

      To send money on Google Pay, you’ll need to search for a Google Pay user that you want to send money to and then tap the Pay button. After pressing this, you’ll be able to choose whether you want to make the payment through Western Union or Wise. Between now and June 16, Western Union will waive transfer fees for remittance payments made on Google Pay and Wise will make users’ first transfer free as long as the payment is under $500.

      Discussing the product offering, Viola Gauci, Product Manager, Google Pay, said:

      According to Google, almost $700 billion is sent abroad to friends and family to help pay for essentials and cover other expenditures. Citing MasterCard, Google said that 73% of people regularly send money abroad. Due to the pandemic, 38% of respondents said they had greater involvement in international payments.

      For the time being, Western Union and Wise will control the fees it levies on users, however, with Google’s involvement, it will be interesting to see whether there's a way to further lower fees. One of the United Nation’s Sustainable Development Goal targets is to reduce remittance fees to less than 3% of the amount being sent by 2030. While remittance services like Wise do offer better prices than some banks, they still haven’t reached the aforementioned target.

    • By Copernic
      Google Chrome 90.0.4430.212 (offline installer)
      by Razvan Serea



      The web browser is arguably the most important piece of software on your computer. You spend much of your time online inside a browser: when you search, chat, email, shop, bank, read the news, and watch videos online, you often do all this using a browser.

      Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. Use one box for everything--type in the address bar and get suggestions for both search and Web pages. Thumbnails of your top sites let you access your favorite pages instantly with lightning speed from any new tab. Desktop shortcuts allow you to launch your favorite Web apps straight from your desktop. Chrome has many useful features built in, including automatic full-page translation and access to thousands of apps, extensions, and themes from the Chrome Web Store.

      Google Chrome is one of the best solutions for Internet browsing giving you high level of security, speed and great features.

      Important to know! The offline installer links do not include the automatic update feature.

      Download web installer: Google Chrome Web 32-bit | Google Chrome 64-bit | Freeware
      Download: Google Chrome Offline Installer 32-bit | 71.0 MB
      Download: Google Chrome Offline Installer 64-bit | 73.3 MB
      Download: Google Chrome MSI Installers for Windows (automatic update)
      View: Chrome Website | v90.0.4430.212 Release Notes

      Get alerted to all of our Software updates on Twitter at @NeowinSoftware

    • By zikalify
      Google announces next steps for YouTube TV on Roku devices
      by Paul Hill

      Google has announced that it has added YouTube TV directly into its YouTube app so that users on Roku devices can continue to access the streaming platform. It comes after Roku pulled YouTube TV from its platform’s store following a failure between the firms to renew their distribution agreement.

      To access YouTube TV from the YouTube app, just click “Go to YouTube TV” in the sidebar on the main app. If you don’t see it yet, be on the lookout for an update to the app in the coming days. Google said it will expand the feature to as many devices as it can over time.

      The search giant said that it’s still working to come to an agreement with Roku so that customers can continue to access the streaming service, however, in a statement published by The Verge, Roku is not happy about what Google has done, branding Google an “unchecked monopolist bent on crushing fair competition”.

      To ensure that customers can continue to access YouTube TV on Roku, Google has also begun discussions with partners to secure free streaming devices on the off chance that Roku finds a way to prevent access to YouTube TV on its platform. On a separate note, Google said it’s also working with Roku to introduce minimum technical requirements for Roku devices so that YouTube delivers a high-quality and consistent experience for users.

    • By Jay Bonggolto
      Google Play Store will add a new section to explain how apps use your data
      by Jay Bonggolto

      Early in 2020, Google introduced policy changes to the Play Store meant to ensure that apps have the right permission to access background location data. Now, the search giant has previewed a new section in Google Play that will increase the transparency around how apps are using your data.

      Google announced today that, beginning in the second quarter of 2022, developers will be required to include information about how their apps collect and share data as well as other data pertaining to privacy and security. With the new safety section, users can check what type of data is collected by the app and how it's used. These pieces of information may include location, contacts, name, email address, photos, videos, audio files, and storage files.

      The new section will also show if an app encrypts data it gathers and obeys Google's policy for creating apps and games for children. It will also highlight whether specific data being accessed is essential for an app's functionality and whether an independent party verified an app's safety section. There are elements in it as well that will show if users can request to have their data removed if they uninstall an app. These pieces of information must be included when developers submit or release updates to their apps beginning next year.

      Developers will gain access to the new policy requirements and resources starting in the third quarter of this year and then they can add the necessary information in the Google Play Console by the fourth quarter. The safety section will go live in Google Play in the first quarter of 2022.

      It's noticeably a similar policy change to what Apple introduced last year for app listings in the App Store. Apple's Privacy Labels essentially provide an overview of data that an app gathers and what it does with it. It's interesting to see how Google will implement this policy in its own ecosystem.