company January 5, 2009

Using Your Own URL as Your OpenID

One of the cooler features of OpenID is delegation. This means, instead of having your OpenID identifier be yourname.myopenid.com it can be simply yourdomain.com Much easier to remember, right? And it’s really easy to do, too! Here’s how I did it. First, sign up for an OpenID with the provider of your choice (note that…
Avatar for Jeff Atwood
Co-Founder (Former)

One of the cooler features of OpenID is delegation. This means, instead of having your OpenID identifier be

yourname.myopenid.com

it can be simply

yourdomain.com

Much easier to remember, right? And it’s really easy to do, too! Here’s how I did it.

First, sign up for an OpenID with the provider of your choice (note that Google, Yahoo, and AOL are all OpenID providers now, so you may already have one — but beware that not all providers support delegation, either). I might be a little biased, but I prefer our very own provider at openid.stackexchange.com, so I recommend signing up with us at Stack Exchange.

openid.stackexchange.com

To enable your domain to act as a delegate to the OpenID provider, you’ll need to figure out what your OpenID identifier is. This is always an URL. To determine your Stack Exchange identifier, visit your profile page on openid.stackexchange.com and look for the Use your own URL to log in link. Then click it!

This explains what you need to do. It’s simple; just add two HTML header tags to your web page, like so:

<html>
<head>
<font color="red"><link rel="openid2.provider" 
  href="https://openid.stackexchange.com/openid/provider"></font>
<font color="red"><link rel="openid2.local_id" 
  href="https://openid.stackexchange.com/user/a0cd3405-f76e-429e-b935"></font>
</head>
…

Once you’ve set this up, click my logins on your profile page, then click add new login… to add the new, delegated login to your account!

Podcast logo The Stack Overflow Podcast is a weekly conversation about working in software development, learning to code, and the art and culture of computer programming.

Related

Stack Overflow podcast logo
podcast November 6, 2020

Podcast 284: pros and cons of the SPA

In this episode we discuss the rise of the Single Page Application, or SPA. From humble beginnings around 2003, it has come to be a dominant approach for many large tech companies and an alluring option for smaller startups. But for simpler web projects, are there better alternatives? Pawel Skolski wrote this definition of the SPA in…
Avatar for Ben Popper
Director of Content