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 8917165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:25:22+00:00 2026-06-15T05:25:22+00:00

I have a development ‘environment’ under a virtual host on an apache server. I’d

  • 0

I have a development ‘environment’ under a virtual host on an apache server.
I’d to block this virtual host and all of it’s sub directories for being indexed by search engines.

I have this code (which I pulled from another question on here) but his question was for the whole server, I’d just like sometime to confirm that this will work, and that it will only affect only the vhost and its subdirs ( I don’t want the whole server affected )

<VirtualHost *:80>
  ServerName d.domain.co.uk
  ServerAlias www.d.domain.co.uk
  DocumentRoot /var/www/html/d.domain.co.uk

  # Block all robots on all subdirs
  <Location "robots.txt">
   SetHandler None
  </Location>
  Alias /robots.txt /var/www/html/d.domain.co.uk/robots.txt
</VirtualHost>

Regards,
Matt

  • 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-06-15T05:25:23+00:00Added an answer on June 15, 2026 at 5:25 am

    Yes, it will only affect this vhost since your <Location> and Alias directives are set inside your vhost declaration.

    Anyway, it’s easy to test: just access /robots.txt on another vhost and check if its content matches the real file or if it’s the same as /var/www/html/d.domain.co.uk/robots.txt

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

Sidebar

Related Questions

I have a development server set up running Apache 2.2 with mod_wsgi. I have
I have development server setup running Adobe Coldfusion8 (.war install) on top of Caucho
I'm new to Python and web development (although I have development experience with Client/Server
I am creating a small commercial web project running Apache/WSGI/Django/MySQL. I have a development
we have a mixed development environment using ASP.NET MVC and Ruby on Rails. We
We have a development box which is inside our network and a web server
I have a development vm which is running sql server as well as some
I know this is a weird on, but in my code, i have development
I have my development machine where I develop the code, my server machine where
I have a development MySQL (InnoDB only) server with several users. Each user has

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.