Skip to content

Commit 173d37b

Browse files
committed
Add detailed warnings to SSR-related configs about impact on SEO.
1 parent 685da4b commit 173d37b

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

config/config.example.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ ssr:
2727
# disabled (false) by default to boost server performance at the expense of loading smoothness.
2828
inlineCriticalCss: false
2929
# Patterns to be run as regexes against the path of the page to check if SSR is allowed.
30-
# If the path match any of the regexes it will be served directly in CSR.
30+
# If the path match any of the regexes it will be served directly in CSR (i.e. SSR will be disabled for this path).
3131
# By default, excludes community and collection browse, global browse, global search, community list, statistics and various administrative tools.
32+
# [WARNING] changing these settings may impact your Search Engine Optimization (SEO). Any paths listed in "excludedPathPatterns"
33+
# may NOT be indexable by search engine crawlers (like Google Scholar). For search engine crawlers to fully index your site,
34+
# this "excludePathPatterns" should NEVER exclude SSR from the homepage, community/collection pages or item/entity pages.
3235
excludePathPatterns:
3336
- pattern: "^/communities/[a-f0-9-]{36}/browse(/.*)?$"
3437
flag: "i"

src/environments/environment.production.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ export const environment: Partial<BuildConfig> = {
55

66
// Angular SSR (Server Side Rendering) settings
77
ssr: {
8+
// WARNING: Disabling SSR will block major search engine crawlers (like Google Scholar) from indexing your site.
9+
// Therefore, we highly recommend keeping SSR enabled at all times. However, for better performance, you may choose
10+
// to minimize the paths that undergo SSR via the "excludePathPatterns" setting below.
811
enabled: true,
912
enablePerformanceProfiler: false,
1013
inlineCriticalCss: false,
1114
transferState: true,
1215
replaceRestUrl: true,
16+
// WARNING: changing these settings may impact your Search Engine Optimization (SEO). Any paths listed in "excludedPathPatterns"
17+
// may NOT be indexable by search engine crawlers (like Google Scholar). For search engine crawlers to fully index your site,
18+
// this "excludePathPatterns" should NEVER exclude SSR from the homepage, community/collection pages or item/entity pages.
1319
excludePathPatterns: [
1420
{
1521
pattern: '^/communities/[a-f0-9-]{36}/browse(/.*)?$',

0 commit comments

Comments
 (0)