There are several methods to control and restrict who gets to see your pages on the web. If you want to allow only non-Stanford people (or some combination of Stanford and non-Stanford people) to see your pages, you will need to employ a method called User Authentication. To allow only Stanford people (all Stanford people, or just particular Stanford people, etc.) to see your web pages, you'll need to use WebAuth. This is the most common method for protecting your pages at Stanford.
This page will direct you to step by step instructions on how to use:
For most people, working with WebAuth on home pages is easy and direct because they're setting restrictions on pages in their own web space. You are, after all, the "owner" of your own home page and home directory. But, if you're trying to WebAuth pages outside your home directory--group pages or departmental web pages--you need to ensure that you have the administrative permissions necessary to effect the changes you desire. The Are you allowed to set permissions? page will tell you how determine if you have the ability to work in one of these other directories.
The Workgroup Manager is a web application that allows you to define groups of Stanford community members for use in various online applications (not just a web page or group of pages) that also utilizes web authentication (WebAuth). See the overview for Workgroups and the Workgroup Manager if this is the type of authentication you need.