Use Your Domain as Your OpenID

Well, it looks like OpenID may be catching on. (I’m still not sure if that’s a good thing, though.) Now, wouldn’t it be cool if you could use your website’s domain as your OpenID URL? It’s easy to do. I’ll use my ID as an example.

First, create an OpenID at any provider of your choice. (You can find a list of providers here.) The URL I ended up with is redwallhp.myopenid.com.

Next, decide what you want your customized URL to be. Do you want just your domain, like mydomain.com, or will you set-up a subdomain (or subdirectory)? I ended up picking my new personal blog at matt.ntugo.com.

Now you just need to add two lines of code to your header.

<link rel="openid.server" href="http://www.myopenid.com/server">
<link rel="openid.delegate" href="http://redwall.hp.myopenid.com/">

Replace the italicized part of the first line with the URL of your provider’s OpenID server. A quick Google search will help you find the right URL (e.g. openid.claimid.com for ClaimID users). Replace the italicized bit of the second line with the OpenID URL your provider gave you.

And your done! You can now use your domain as your OpenID URL. This has the benefits of being easy to remember, and you can just change those lines of code if you decide you decide to switch from MyOpenID to ClaimID.

  • http://www.shaboominc.com/blog Molly Gordon

    Hey Matt,The resulting header is viewable in the source code – seems like this would be a security risk.Or not?

  • http://www.webmaster-source.com Matt

    Not really. The server URL is publically available information (you can figure it out by looknig around your provider’s site). Your OpenID URL is generally known by people as well, and it’s useless to anyone without your username and password.

  • Pingback: WP-OpenID | Webmaster-Source

  • http://www.webburr.com sunil chhabra

    thanks for article i had set up my Open ID……It work for me…