Limit Users Signup to Users from Specific Domain I have an eLearning page people from a .gov domain need to access.  I want them to be able to sign up for a user account and get immediate access, but I only want people from within that domain and perhaps one other to have this privilege.  I would want to approve any other users before they gain access.  Is this possible?
Probably best to do all of this from a custom plugin (that way you can write the logic for the approval process).

But regardless, you can do something like this from the top of your template:

{% if craft.request.getServerName() is not "mydomain.gov" %}
    {% exit 503 %}
{% endif %}


And similarly any controller actions would have:

if (craft()-&gt;request-&gt;getServerName() !== 'mydomain.gov" )
{
    throw new HttpException(503);
}