Use your own website as OpenID login

1 minute read

This article will show you how to use the OpenID delegation feature which allows you to use your own domain as an identifier for OpenID.


If you want to use OpenID as an authentication mechanism, but are afraid of the fact that your OpenID provider may die in the future, or you simply might want to use another provider in the future, you can use a delegation model with OpenID.

A reason to change the OpenID provider might be, that your current OpenID provider does not support an authentication mechanism you like to, as for example the YubiKey or something like that.

Let’s say you want to use as your OpenID and you want to use as your Identity Provider, you have to execute the following steps.

Create a (sub-)domain for called xyz.

This can for example be done by adding another virtual host to your apache configuration. The configuration might look like the following one:

<VirtualHost xx.xx.xx.xx:80>

	DocumentRoot /var/www/xyz/

	<Directory /var/www/xyz/>
		#Options Indexes MultiViews
		AllowOverride None
		Order allow,deny
		allow from all

	ErrorLog /var/log/apache2/error_xyz.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.

	LogLevel warn
	CustomLog /var/log/apache2/access_xyz.log combined

Create a index.html file inside your document root

As a next step you have to create a index.html file in your document root (in this case /var/www/xyz) with the following content in order for OpenID services being able to find your current identity provider.

<title>Jens' OpenID delegation page</title>
  <link rel="openid.server" href="" />
  <link rel="openid2.provider" href="" />
  <link rel="openid.delegate" href="" />
  <link rel="openid2.local_id" href="" />
<h1>This page is used for OpenID delegation.</h1>
For more information on OpenID either visit <a href=""><a> or <a href=""></a>


From now on you can use as your OpenID, which will, as currently configured, be redirecting to where authentication will take place.


You can read all about OpenID in the spec, but the part used for this example is available at: