Site URLs
As your site is created, or evolves, you may find it necessary to have absolute control over your URLs and URL structure. Brightspot provides a complete solution to allow you to manage your URLs, redirects, etc.
A URL is an address that you type in your browser’s address bar, and every item that you publish in Brightspot has its own unique URL. The base portion of a URL typically starts with https:// followed by a domain name. The following table describes the different types of base URLs you can assign to each of your sites.
To learn how to configure or update various base URLs, see Configure base URLs.
| Type of base URL | Description |
|---|---|
| Site URL | Base portion of a URL a visitor uses to view your content. |
| Preview URL | Base portion of a URL used to preview content when using a headless environment. |
| Tool URL | Base portion of a URL that editors use to log in to Brightspot. |
For example, a Brightspot user publishes content to three sites (Example Site 1, Example Site 2, and Example Site 3). The following table shows how Brightspot has set up its domain names:
| Site | Base URL | Type |
|---|---|---|
| Brightspot | http://editors.{Brightspot-site}.com | Tool URL |
| Example Site 1 | http://www.{example-site-1}.com | Site URL |
| Example Site 2 | http://www.{example-site-2}.com | Site URL |
| Example Site 3 | http://www.{example-site-3}.com | Site URL |
The user logs in using http://editors.{brightspot-site}.com/cms. Whenever the user works on an article, they see URLs similar to the following in their browser—regardless of the site to which the user is publishing content.
http://editors.{brightspot-site}.com/cms/content/edit.jsp?typeId=0000&id=11111
In the above URL, http://editors.{brightspot-site}.com is the base URL, and /cms/content/edit.jsp?typeId=0000&id=11111 is the path.
Visitors who want to read one of the articles see a URL similar to the following in their browsers.
http://www.{example-site-1}.com/example-content
In the above URL, http://www.{example-site-1}.com is the site URL, and /example-content is the permalink.
To learn how to configure or update various base URLs, see Configure base URLs.
Configuring base URLs
This topic explains how to configure various base URLs.
| Type of base URL | When to set | Where to set |
|---|---|---|
| Site URL | You have a site to which you publish content. Multiple sites require different site URLs. | You can set site URLs only at the Site level. 1. Click > Admin > Sites & Settings. 2. In the Sites widget, select the site for which you want to configure a site URL. 3. In the URLs field, enter site URLs that pertain to the site. 4. Click Save. |
| Preview URL | You are using Brightspot in a headless implementation. | You can configure a default preview URL at the Global level or site-specific preview URLs at the Site level. To set at the Global level: 1. Click > Admin > Sites & Settings > Sites > Global. 2. Under Default Preview URL, enter a preview URL that serves as the default preview URL for all sites. 4. Click Save. To set at the Site level: 1. Click > Admin > Sites & Settings. 2. In the Sites widget, select the site for which you want to configure this setting. 3. Under the CMS tab, locate the Preview URL field. 4. Enter a preview URL that pertains specifically to the site. 5. Click Save. |
| Tool URL | When a tool URL has not yet been set. | You can set a Tool URL only at the Global level. 1. Click > Admin > Sites & Settings > Sites > Global. 2. Under Default Tool URL, enter a tool URL that serves as the default tool URL for all sites. 4. Click Save. |
URLs and trailing slashes
Brightspot assigns permalinks to assets, and those permalinks most often have no trailing slash. For example, an asset with the title Breakfast has a permalink /breakfast, and its URL is http://example.com/breakfast.
Visitors may mistakenly request URLs with a trailing slash. For example, you have an asset with the URL http://example.com/breakfast. To view that asset, a visitor mistakenly requests the non-existent URL http://example.com/breakfast/, and receives an error 404.
In rare cases, a permalink may have a trailing slash. For example, an asset with the title Lunch has a permalink /lunch/, and its URL is http://example.com/lunch/. To view that asset, a visitor may mistakenly request the non-existent URL http://example.com/lunch, and receive an error 404.
(When a permalink ends with a trailing slash, Brightspot internally appends index to the permalink. In this example, the permalink is /lunch/, and Brightspot internally stores the permalink as /lunch/index.)
You can configure Brightspot to append or remove trailing slashes so that visitors receive their intended assets—not an error 404.
To configure trailing slash behavior:
- Click > Admin > Sites & Settings > Sites > Global.
-
From the CMS tab, expand the Advanced cluster.
-
From the Trailing Slash Configuration list, select one of the following.
- Do Not Change—Incoming URLs are not changed.
- Remove—Removes trailing slashes from incoming URLs unless an asset already exists at the modified URL.
- Normalize—Changes the incoming URL to an existing one (if possible).
For an explanation of these settings, see Trailing slash behavior in URLs.
-
Click Save.
Trailing slash behavior in URLs
The field Trailing Slash Configuration has three options: Do Not Change, Remove, and Normalize. This topic provides examples showing how those options affect the lookup process for asset requests.
Suppose your site has assets at the following URLs:
- http://example.com/breakfast (permalink is
/breakfast). - http://example.com/lunch/ (permalink is
/lunch/, internally stored as/lunch/index).
The following table shows how Brightspot receives a requested URL and, depending on the value of Trailing Slash Configuration, determines the asset to return.
| Requested URL | Returned asset |
|---|---|
| Do Not Change—Brightspot does not modify the URL of the requested asset. | |
http://example.com/breakfast | Asset with permalink /breakfast. |
http://example.com/breakfast/ | There is no asset with permalink /breakfast/, so Brightspot returns a not found (error 404). |
http://example.com/lunch | There is no asset with permalink /lunch, so Brightspot returns a not found (error 404). |
http://example.com/lunch/ | Asset with permalink /lunch/. |
http://example.com/dinner | There is no asset with permalink /dinner, so Brightspot returns a not found (error 404). |
http://example.com/dinner/ | There is no asset with permalink /dinner/, so Brightspot returns a not found (error 404). |
| Remove—Brightspot removes a trailing slash unless an asset exists at the returned URL. | |
http://example.com/breakfast | Asset with permalink /breakfast. |
http://example.com/breakfast/ | There is no asset with permalink /breakfast/, so Brightspot removes the trailing slash and returns the asset with permalink /breakfast. |
http://example.com/lunch | There is no asset with permalink /lunch, so Brightspot returns a not found (error 404). |
http://example.com/lunch/ | Asset with permalink /lunch/. |
http://example.com/dinner | There is no asset with permalink /dinner, so Brightspot returns a not found (error 404). |
http://example.com/dinner/ | There is no asset with permalink /dinner/, so Brightspot removes the trailing slash and attempts to return the asset with permalink /dinner. There is no asset with that permalink so Brightspot returns a not found (error 404). |
| Normalize—Brightspot adds or removes the trailing slash as necessary to match an existing URL. | |
http://example.com/breakfast | Asset with permalink /breakfast. |
http://example.com/breakfast/ | There is no asset with permalink /breakfast/, so Brightspot removes the trailing slash and returns the asset with permalink /breakfast. |
http://example.com/lunch | There is no asset with permalink /lunch, so Brightspot adds the trailing slash and returns the asset with permalink /lunch/. |
http://example.com/lunch/ | Asset with permalink /lunch/. |
http://example.com/dinner | There is no asset with permalink /dinner, so Brightspot adds the trailing slash and attempts to return the asset with permalink /dinner/. There is no asset with that permalink, so Brightspot returns a not found (error 404). |
http://example.com/dinner/ | There is no asset with permalink /dinner/, so Brightspot removes the trailing slash and attempts to return the asset with permalink /dinner. There is no asset with that permalink, so Brightspot returns a not found (error 404). |
Content URL behavior
Brightspot automatically generates URL permalinks for assets you create (see URLs widget). Below is an explainer about how this behavior works.
By default, assets created in Brightspot get an auto-created permalink URL based on these rules:
- For assets that have a URL Slug field (like Article or Listicle, for example), this will be read first in order to create the URL.
- For assets without a URL Slug field (like Page or Tag), the URL will be automatically generated from the asset’s primary field (like Display Name).
Sections affect URLs a little differently.
-
If no section is added to an asset, the end of the URL is
/asset-title. -
If you assign a section to an asset, the URL is
/section-name/asset-title. -
You can create a section hierarchy, in which one section is the parent of another. The below example illustrates how this affects URLs.
-
Create section 1.
- URL:
/section-1
- URL:
-
Create section 2, and assign section 1 as its parent.
- URL:
/section-1/section-2
- URL:
-
-
Create section 3, and assign section 2 as its parent.
- URL:
/section-1/section-2/section-3
- URL:
If you add the section at any point in the asset’s workflow before publishing, it will change the auto-generated URL; however, once you publish the asset, this will not happen, and it will retain the URL path that was already generated for it.
URLs in a multi-site environment
In a multi-site environment, the URLs widget includes a list option to select a site. Brightspot publishes the asset to the site set in this option using the URL you provide.
As shown in the following example, you can publish an asset to multiple sites with the URLs widget. If you set Global, Brightspot publishes to all sites.
When publishing to multiple sites, you can use the same permalink across multiple sites because each site has a different domain name.
Alternatively, you can set site-specific permalinks on an asset.
An asset that can be published to multiple sites is not automatically accessible in Brightspot to editors working in those sites. For example, in the URLs widget, an asset can have a URL for the Stargazers site, but in the Sites widget, the Stargazers site can be denied access to the asset.
Deleting URLs
This topic explains how to delete URLs for your content in Brightspot.
To delete a URL:
- Search for and open the item on the content edit page.
- In the URLs widget, click corresponding to the URL that you want to delete.
- Complete your site’s workflow and publish the item.