Skip to content

Thoughts on Saleforce

A community dedicated to making Salesforce, it's products, and partners better...

Click to register with for a FREE 30-DAY TRIAL!


Login Form

Lost Password?
No account yet? Register

URL Structure

table.url-info {margin-top:1em;margin-left:1em;width:90%}
table.url-info th {text-align:left;background-color:whitesmoke;;padding:0.25em;}
table.url-info td {padding:0.25em;}
.longurl {font-size:0.8em;font-family:Courier New,Courier,Monospace;}
.footnotes {font-size:0.8em;}
.sidebar {float:right;margin-left:1em;font-size:0.9em;width:25%;border:thin solid red;padding:1em;background-color:whitesmoke;}
img.browserurl {border:thin solid; margin-left:1em;margin-bottom:1em;}
li {font-size:1.1em;}

URL for adding an Account to with return to the Home Page

Recently I decided I wanted to create soom "quick launch" bookmarklets for I wanted buttons on my browser toolbar that would take me to specific Mods in and execute the exact action I wanted without having to first visit a page with such a link, or worse having to use that infernal little drop down for creating new records/objects. For example, I really wanted a button for creating a new Account that was always available.

Of course creating a quick launch button requires understanding’s URL structure because in their infinte wisdom has decided that Professional and Team customers are second class and don’t need access to the API because we are just not sophisticated enough to need it. (Sorry there if my sarcasm there is just a bit too obvious.)

Anyway, though I didn’t do an exhaustive search, I googled and couldn’t find anything that explained it so I attempted to grok it on my own. Based on my research which I was obviously only able to do with my own account and thus might not fully apply to others, It appears their URLs work something like this assuming you are logged into

Code Module URL to Module Home Page
001 Accounts https://<s>
003 Contacts https://<s>
006 Opportunities https://<s>
015 Documents https://<s>
500 Cases https://<s>
501 Solutions https://<s>
800 Contracts https://<s>
00O Reports https://<s>
00Q Leads https://<s>
01Z Dashboards https://<s>
a00 Custom Tabs1 https://<s>
a01 Products https://<s>

 1 Of course this is just for the first custom tab. Not sure about what happens we you create more.

For <s> I have always found it to be "na1" for (I assume) "North American server #1" (although I tried "sa1" and "eu1" and they both gave me a "Could not find domain" result in my browser so maybe that theory isn’t so good.) I even tried to set up a secondary DNS server to pull down the subdomains for, but they evidently have them configured to block Zone transfers (go figure!). Here’s my CMD window/NSLookup transcript:

C:Program FilesSupport Tools>nslookupDefault Server:  xxxxAddress:

> salesforce.comServer:  xxxxAddress:

Non-authoritative answer:Name:    salesforce.comAddress:

> set type=ns> salesforce.comServer:  xxxxAddress:

Non-authoritative  nameserver =  nameserver =  nameserver =  nameserver =  nameserver =  nameserver =    internet address =      internet address =

Moving on, I researched URLs for the following actions:

URL to Excute Acction
View All Objects


View Object’s Home


View Object


Add Object


Edit Object


Clone Object


Add Related Task


In the above table:

  • The term "Object" refers to a instance/record in a Module, i.e. an Account, a Lead, a Contact, etc.
  • retURL will often start with "%2F" when viewed in your browser. %2F is just the hex-encoded equivalent of "/" that the browser performs automatically on such characters when found in URL parameters.
  • <s> always seemed to be "na4" for these URLs, but your mileage may vary.
  • <m> refers to the three position alphanumeric from the first table (i.e. "003" for Contacts and "01Z" for Dashboards.)
  • <o> refers to the internal ID that maintains for every unique object in its system. If you ever use the Excel Connector for mass data updates you’ll get to directly play with them (Professional Editions and above only;  Team Edition customers need not apply.).
  • <r> refers to the previous domain-relative URL (i.e. starting with a "/" instead of "") to which should return after the user completes the request action. If retURL is omitted, returns to "/home/home.jsp".
  • who_id refers to the Object to which the task should be associated, prefix with it’s Mod code.

If it’s more than a few days since Oct. 1, 2006 you might want to also check out this link for updated information:

Salesforce’s URL structure

There are a lot of other URLs in, but they start breaking down in consistency and use different conventions for similar concepts as if different groups within implemented them and they didn’t have the foresight to coordinate on conventions. However, I think I’ve documented the most important URLs and with the above information you can probably grok any others on your own.  Besides. I wasn’t planning on writing a complete manual on URLs when I sat down to write this post. :)

BTW, one of my ongoing campaigns has for a long time been to see more web developers and designed consider URL design to be an important component of web application design. As such, I recently launched a website called with a mission to encourage more people to recognize the value of good URL design. On the aspect of URL design, I would give a grade of B+ which is much better than I would give most websites.

At among other things I plan to (get people to) document URL Structure for the various websites and installable web applications, especially if not documented by their respective vendor. That said, I’m going to copy this information about’s URL Structure over to wiki and potentially augment it over time.

If you do end up figuring out any of the other URLs, please just on over to the’s URL Structure section on the wiki for  and document the layout for the benefit of future seekers of the same information. Also go ahead and post a comment  here indicating which URL you documented and a another link to the wiki page where your updates can be found.

9 Responses to “URL Structure”

  • Kingsley Joseph responded:

    You’ve got it all figured out :) . You might have also noticed that when you’re looking at a single record, the url is even simpler, with just the record id after the domain. The first three characters of the record id are the same as the prefix for that object, so you can often tell from a url what kind of object it links to.

    About the subdomains - they are :AP, EMEA, NA1, NA2, NA3, NA4. You can find them all on They are region-wise splits (AP - Asia Pacific & EMEA - Europe, Middle East & Africa).

    The reason we don’t have it cataloged is because we don’t want to encourage use of the url as API. We do try to make it possible, and if you use it that way, we’ll just wink at you, but we’re not putting a seal of approval on it.

  • Kingsley Joseph responded:

    Forgot to mention - your uri’s will work on any org as long as the region based subdomain is changed to the org’s native sub domain.

  • responded:

    Admins Corner: Some thoughts on URL Structure from Thoughts on

    Great article over on Thoughts on This discussion revolves around understanding the structure of that confusing blog of text in the address bar, the Salesforce URL. So why is this important?
    Well, when you get into the more advanced tip…

  • Perspectives on responded:

    Salesforces URL Structure

    Mike at Thoughts on posted a nice overview of the URL Structure.
    He also references a site Id never heard of called Heres a link to the Salesforce page on that site.

  • Mike Schinkel's Miscellaneous Ramblings responded:’s URL Structure

    Quick mention of my documenting’s URL structure…

  • Mike Schinkel responded:


    Mucho thanks for commenting. I *really* appreciate it.

    But would you mind clarifing a few things, please?

    1.) You mention the different subdomains, but you didn’t specify the difference between NA1, NA2, NA3, and NA4. Are the all equivalent, or as my inspection indicated, are they being used for different things?

    2.) I notice shows an SSL subdomain. What is it and how is it used?

    3.) When you say “You might have also noticed that when you’re looking at a single record, the url is even simpler, with just the record id after the domain.” can you clarify with a specific example?

    4.) When you say “your uri’s will work on any org as long as the region based subdomain is changed to the org’s native sub domain” how do I know? Do I just login and see? Is there any way to know in advance? If I wanted to write a bookmarklet that would work for any random salesforce user, how could I know without them having to (be technical enough to) tell me?

    5.) I know you say that you don’t encourage the use of the URL as API, but would you help me maintain the following? It’s not an official site and only those who really wanted the information would find it. You wouldn’t even need to login under your own name, just a psuedonym!

    6.) Has considered using Microformats on your pages such as hCard (, hCalendar (, XOXO, and more

    7.) Has considered offering a REST/RSS/Atom based API and offering to everyone, even Team edition customers? If not, you might find this post of interest: :)

  • Kingsley Joseph responded:

    I’ll provide a more detailed response via email, but the answer to 6 is at

  • Pete Dapkus responded:

    just to put a finer point on Kingsley’s comment — just keep in mind that it’s not currently a supported API. We don’t change our URLs often, but they are subject to change without notice. So, coder beware.

  • Mike Schinkel responded:

    Kingsley: Cool on the Microformats! I look forward to that email.

    Pete: I appreciate what you are saying about the URL; programmers for years have programmed against “undocumented” APIs and have always been warned about the potential pitfalls. :)

    That said, I would like to postulate that, with microformats I think we’ll start to see “Casual Web Services (CWS)” or maybe we’ll call them “Structured Screen Scraping (S3)” where HTML web pages become simple REST-based web services.

    I for one plan to promote that concept in a far broader scope than just Salesforce on my main blog at as well as among the microformat lists that I have just joined. I would hope I could encourage to consider being an early adopter of that initiative.

Add your own comment...