Name

allow

Synopsis

                     allow 
                     from 
                     hostname 
                     hostname 
                     ...

[Within <Directory> or .htaccess]

The allow directive specifies which hosts can access a given directory in the site. The hostname can be any of the following:

Domain name

A domain name, like .oreilly.com. Only hosts from the domain are permitted access.

Hostname

A full hostname.

Full IP address

An IP address of a host.

Partial IP address

The first 1 to 3 bytes of an IP address, for subnet restriction.

Network address/netmask

A full network address, followed by a full netmask. (i.e., 192.168.220.110/255.255.255.0)

Network address/CIDR specification

A full network address, followed by an abbreviated netmask. (i.e., 192.168.220.110/24 is equivalent to 192.168.220.110/255.255.255.0)

all

Using this option means that all hosts are allowed.

There can be only one allow directive per section. If omitted, there is no default.

Get Webmaster in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.