---
title: "Site collections"
date: "2024-02-14T06:18:38+00:00"
summary: "Organize and manage related websites efficiently with site collections in Acquia Site Factory. Create primary and secondary sites, assign custom domains, and easily swap production sites without contacting your domain registrar."
image:
type: "page"
url: "/site-factory/site-collections"
id: "b06611ca-3343-49c6-9c5a-f7980faa2dc9"
---

To help you develop and maintain your production websites, you can create site collections, which bundle and organize related websites.

A site collection contains a primary website (to which you can associate a custom domain name) and one or more secondary websites. Site visitors can view the primary website in a site collection using one of the following URLs:

*   The website’s Site Factory URL
    
*   The site collection’s URL
    
*   One of the custom domain URLs associated with the site collection
    

For example, you have a production website that describes a product, but you also have a staging website that contains the theme and content changes that you’re currently developing. Having both of these websites in a site collection, you can associate the current production website with a custom domain URL. When the staging website is complete, you can swap the websites, making the staging website the production website with the custom domain URL (without having to contact your domain name registrar regarding the website change).

Note

*   Only user accounts with the [platform admin](/site-factory/manage/users/admin/platform-admin) or [site builder](../users/admin/site-builder.html) role can create or manage site collections.
    
*   The websites contained by a site collection are completely separate from one another and do not have any common workflow capabilities (development, staging, production).
    
*   You can duplicate a production website to create a secondary development website in the site collection, and then later promote it to the primary website. (Note that the new primary website doesn’t contain databases or user-created items created after you duplicated the website.)
    

Creating a site collection
--------------------------

To create a new site collection:

1.  [Sign in](/site-factory/login) to the Site Factory Management Console.
    
2.  Select the site group that you want to contain the new site collection.
    
    Note
    
    You can create site collections only inside of site groups.
    
3.  Click the arrow to the right of **Create a new site** to open its menu.
    
    ![Creating a site collection](https://acquia.widen.net/content/phuiwibytp/jpeg/site-factory_creating-site-collection.jpeg?position=c&color=ffffffff&quality=80&u=u1mnox)
    
4.  Click **New site collection**.
    
5.  In the **Site collection name** field, enter a descriptive name for the site collection to display in the Site Factory Management Console (for example, `Product site`).
    
6.  In the **Internal URL** field, enter the Site Factory site collection name to use with its URL (for example, `prodsite`). The Site Factory base URL is added to this name.
    
7.  Click **Continue**.
    
8.  In the **Site name** field, enter the [sitename](/definitions/sitename) for one of your websites. Site Factory displays websites that match your entry as you type. As you add websites to the site collection, the page displays additional site name fields to allow you to add multiple websites.
    
9.  If you want to add additional websites to the site collection as secondary websites, enter them in the additional site name fields.
    
10.  Click **Finish**.
     

Using the site collection interface
-----------------------------------

After you create a site collection, the Site Factory Management Console displays a detail page that you can use to manage the collection.

![Collection details page](https://acquia.widen.net/content/pupum687ez/jpeg/site-factory_site-collection-details-page.jpeg?position=c&color=ffffffff&quality=80&u=u1mnox)

1.  Site collection URL
    
2.  Number of websites in the site collection
    
3.  Methods to add or remove custom URLs associated with the site collection
    
4.  Primary website management
    
5.  Secondary websites in the site collection
    
6.  Groups that contain this site collection
    

Managing secondary sites
------------------------

After you’ve created a site collection, you can add or remove secondary websites to the collection.

### Adding sites

To add a website to a site collection as a secondary website:

1.  Go to the site collection detail page.
    
2.  In the **Secondary sites in this collection** section, click **Add**.
    
3.  In an empty **Site name** field, enter the [sitename](/definitions/sitename) for one of your websites that you want to add to the collection. Site Factory displays websites that match your entry as you type.
    
4.  Click **Finish**.
    

Note

A website can be a secondary website for only a single site collection.

### Removing sites

To remove a secondary website from a site collection:

1.  Go to the site collection detail page.
    
2.  In the **Secondary sites in this collection** section, find the website that you want to remove from the site collection.
    
3.  Click the website’s minus button.
    
    ![Removing secondary site](https://acquia.widen.net/content/2390582rdk/jpeg/site-factory_removing-secondary-sites.jpeg?position=c&color=ffffffff&quality=80&u=u1mnox)
    
4.  To confirm the website’s removal from the site collection, click **Confirm**.
    

The website is no longer in the site collection and is moved back to the group or subgroup that contains the site collection. If the website is removed from a site collection that is not a member of any group or subgroup, the website is listed only on the **All my sites** page.

Setting a new primary site
--------------------------

To make a secondary website the primary website for a site collection (which associates the site collection’s URL and any of its custom domain names with the new primary website):

1.  Go to the site collection detail page.
    
2.  In the **Secondary sites in this collection** section, find the website that you want to set as the new primary website.
    
3.  Click the website’s **Make primary** button.
    

### Controlling access to this feature

By default, users with the _platform admin_ and _site builder_ roles can promote secondary websites to the primary website for a site collection. If you want to limit the users who can complete this action to only _platform admins_, use the following steps:

1.  [Sign in](/site-factory/login) to the Site Factory Management Console as a user with the _platform admin_ role.
    
2.  In the admin menu, click **Administration**, and then click the **Manage permissions** link.
    
3.  Select the roles that you want to be able to promote a secondary website.
    
4.  Click **Save**.
    

Assigning custom domain names
-----------------------------

You can associate one or more custom domain names with each of your site collections, and each custom domain displays the current primary website with the associated site collection. This allows you to change your primary website (for example, you’re making a development website the new production website) without having to contact your domain name registrar.

Note

If your primary website uses the [External Links](https://drupal.org/project/extlink) module, validate your website’s external links pattern matching to ensure that it’s configured to handle new custom domains.

### Associating custom domains

For information about associating custom domain names with your site collections, see [Adding custom domains to your site](/site-factory/manage/domains).

### Removing custom domains

To remove a custom domain from a site collection:

1.  Go to the site collection detail page.
    
2.  Click **Manage collection domains**.
    
3.  In the **Domains belonging to this collection** section, find the domain name that you want to remove.
    
4.  Click the domain name’s minus icon.
    
    ![Removing custom domain](https://acquia.widen.net/content/gzxxkjarpt/jpeg/site-factory_removing-custom-domain.jpeg?position=c&color=ffffffff&quality=80&u=u1mnox)
    
5.  To confirm the removal, click **Delete**.
    

Deleting a site collection
--------------------------

To delete a site collection:

1.  [Sign in](/site-factory/login) to the Site Factory Management Console as a user account with the [platform admin](/site-factory/manage/users/admin/platform-admin) role.
    
2.  Find the site collection that you want to delete on the **All my sites** page, the **All my groups** page, or in a group that contains the site collection, and then open its actions menu.
    
    ![Deleting collection](https://acquia.widen.net/content/94ucjwzhmi/jpeg/site-factory_deleting-collection.jpeg?position=c&color=ffffffff&quality=80&u=u1mnox)
    
3.  Click **Delete collection**.
    
4.  To confirm that you want to delete the site collection, click **Delete**.
    

Site Factory deletes the site collection, but not the websites that it contained. You can find websites from deleted site collections on the **All my sites** page, because these websites do not belong to any group.

Note

If you delete a site collection, you cannot reuse its name for a site collection in the same Site Factory subscription.