Using CometChat across multiple subdomains

You can run CometChat across multiple domains/sub-domains. Please follow these steps AFTER you have installed CometChat at atleast one location.

An ideal use of this feature is when you have CometChat installed at and want to also use it on

To allow your sub-domains to use CometChat as well, perform the following steps:

* Edit cometchat/config.php and set BASE_URL to the full path e.g.
* Then set CROSS_DOMAIN to 1


* Add the following code to the site template of your sub-domains (remember to include the full URL path).

Add the code immediately after <head> tag:

<link type="text/css" rel="stylesheet" media="all" href="" /> 
<script type="text/javascript" src="" charset="utf-8"></script>

Your users must be logged into your main site inorder to use CometChat in your sub-domains.

Use of CometService or alternatives is strongly recommended when using CometChat in cross-domain environment.

Not finding what you need?

The CometChat team is here to help!