You cannot authenticate a browser with a referrer header.
If you want to authenticate an individual, you most likely need a login system in which they provide credentials (username / pwd), and you check them against your authorized user base. If they pass, then you will set a certain type of cookie in your browser that indicates that it is a legitimate user. Subsequent requests from this user will contain this cookie, which you can check with each request.
The cookie should be what you create so that you can make sure that it cannot be easily guessed or faked (for example, a session or an encrypted token from your server). Usually you set the cookie to expire after a while so that the user logs in again.
source share