function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Can custom web address be mapped to URLs with sub domains?

Imaging this scenario.


I have a massive corporate website at

I have created a site called PRM and it's standard URL is

It has a page like this:


Is it possible to map this site to something like ?




only possible with the pilot url-rewriter feature

So with that in mind perhaps you can answer this.


Most of the pages will be iframes embedded in This works just okay. The biggest problem is these pages are hosted on different domains and javacript cannot access or manipulate the parent page from the iframe. 


Nearly all of these iframe sites are simple web forms that will allow us to do complex lead assignment and validation on existing records before insertion. Some times there will be an error on the page, such as a field is required. I currently have a message on the field and at the top of the page saying, "Please fix errors below". Problem is I can't scroll the page to the top for the user to see this message. Depending on the size and location of the error, the user won't know what is wrong and they may not see the error messages.


Do you know if an iframe in with a src of "" will be able to interact with the parent page or is this simply masking the URL and the javascript will know they are on two seperate domains; and




Message Edited by TehNrd on 01-28-2010 01:35 PM

If you want to use


Where contact is the name of your visualforce page, that will work without any rewriting. 


Two levels in the site path, will not work.

Not following. How would you set that up?

Ryan has a point. I thought you wanted to have a path "prm".

But I see our required field on the default web address is confusing.

You can create a site without a path. But once you have more than one site you have to start specifying value for the path. 


So I can map to with no issues?


We would create a CNAME for for thse two and then the Custom Web Address value would be ""?




yes, create a cname to point to

wait until cname is in place globally (we do a dns check when you try to populate site custom web address)

then drill down to the site with no path and populate the custom web address field 


On the last step, the custom web address would be, "" or ""?


To confirm, if we do this we will only be able to map one site to a subdomain as any other sites created after this must have custom defualt web address, which will create a path, and these can't be mapped to sub domains.


And finally, once this is setup do either of you know if script in an iframe that contains the site will be able to interact with the parent page?


Sorry for the plethora of questions but I will have to work with IT (I'm in sales development) and I need to get my facts straight before I approach them about implementing this.


Thanks for all the help,


Message Edited by TehNrd on 02-08-2010 10:04 AM

let me try to clarify


your domain is and this is registered at your org level


then depending on the edition you have you can create up to 25 sites in your org

and each site must have a unique default web address, the the uniqueness is based on the path value 

site 1:

site 2: 


site 25: site 2:


each site url can be mask with a custom domain name (these values must be unique, you can't use the same custom domain name for multiple sites)


all of these custom domain names (or subdomain names) will be cnamed to your org level domain name. However, you need to populate the custom web address values at the site level


so the custom domain name takes you all the way to your org, and we use the custom web address value to figure out which site we need to display.




For the part related to iframe interacting with the parent page...

Seems like might work

you would need to set 


document.domain = "";





here is a related article


Message Edited by Bulent on 01-28-2010 04:10 PM

Ok, I think I got this....maybe.


No path: (no Default Web Address)

"" masked to "".        CNAME 

Set custom web address as "".

Access a page like this, "



Site with path:


"" masked to "".        CNAME 

Set custom web address as "".

Access a page like this, "






Message Edited by TehNrd on 01-28-2010 04:43 PM
you got it!

Hurray! Thanks!


I've been reading about cross domain scripting all day, and I think it will work, but will report back if we get this up and running.


Very good info Bulent, thank you.


My question is what happens with SSL?


I have a client where we are rolling out a Site authenticated Customer Portal. They would like to use their own custom domain name with a CNAME entry, which is what the docs say and is illustrated by the previous posts.    CNAME


The idea being that: is masking



If this does work (which I will tray asap) with SSL, what would the domain be on the digital certificate request?





CNAME'ing to the secure site will not work.