Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 931671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:32:37+00:00 2026-05-15T20:32:37+00:00

I am storing my sitemaps in my web folder. I want web crawlers (Googlebot

  • 0

I am storing my sitemaps in my web folder. I want web crawlers (Googlebot etc) to be able to access the file, but I dont necessarily want all and sundry to have access to it.

For example, this site (stackoverflow.com), has a site index – as specified by its robots.txt file (https://stackoverflow.com/robots.txt).

However, when you type https://stackoverflow.com/sitemap.xml, you are directed to a 404 page.

How can I implement the same thing on my website?

I am running a LAMP website, also I am using a sitemap index file (so I have multiple site maps for the site). I would like to use the same mechanism to make them unavailable via a browser, as described above.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:32:37+00:00Added an answer on May 15, 2026 at 8:32 pm

    First, decide which networks you want to get your actual sitemap.

    Second, configure your web server to grant requests from those networks for your sitemap file, and configure your web server to redirect all other requests to your 404 error page.

    For nginx, you’re looking to stick something like allow 10.10.10.0/24; into a location block for the sitemap file.

    For apache, you’re looking to use mod_authz_host‘s Allow directive in a <Files> directive for the sitemap file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im storing columns in database with users able to add and remove columns, with
I use HashMaps for storing sets of pairs, but I also have to be
in my Web.sitemap I have this: <?xml version=1.0 encoding=utf-8?> <siteMap xmlns=http://schemas.microsoft.com/AspNet/SiteMap-File-1.0> <siteMapNode url=~/ title=Úvodní
Searching element of xml file using C# but getting following Error: Sequence contains no
I'm writing a script to download gzipped XML sitemaps; the files download, but they
I want to serialize like this <urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9 xmlns:news=http://www.google.com/schemas/sitemap-news/0.9> </urlset> But wrong result generated.
When storing plots in a pdf R generates a temporary file (e.g. /tmp/RtmpFKQqjI/pdf317d27df81a0 )
How to parse the xml file? <?xml version=1.0 encoding=UTF-8?> <sitemapindex xmlns=http://www.sitemaps.org/schemas/sitemap/0.9> <sitemap> <loc>link</loc> <lastmod>2011-08-17T08:23:17+00:00</lastmod>
I want to create from XML some objects, but when I'm trying I get
Storing credit card information securely and legally is very difficult and should not be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.