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
Natalie Spatharakis 17Natalie Spatharakis 17 

I added a Custom Domain for my Site (and added same site.prefix), and everything works great except logout ($site.Prefix/secur/logout.jsp)

The current domain for our Site is my<companyname>.force.com/<sitePrefix> and we re-branded, so I am setting up a custom domain & custom URL with a new name.

I set up order.<companyname>.com as a custom domain, and assigned it to the Site with

order.<companyname>.com/<sitePrefix>

When I added this custom URL, the following perfect things happened:

 - All URL redirects that were in place for /<sitePrefix>/somePage ----> /<sitePrefix>/someOtherPage
Continued to work, except with orders.<companyname>.com/<sitePrefix>

 - The old domain continued to go to the Site, but the URL was then replaced with the new one. Great!

My one problem:

Logout doesn't work. I can see that the Site's template/code for logout is "{!$Site.Prefix}/secur/logout.jsp"
Since the site prefix is the same, I can't understand why I'm having issues with the logout functionality.

Detail on what happens on Logout with the new domain:

When you first login, you are brought to a home page. When you click logout after the new domain was added, instead of logging out, it just brings me back to the homepage. When the credentials expire in the browser eventually, it just brings you to the home page still (rather than login screen) only no data is available since nobody is authorized.