{"record":{"id":"bb29b7c10e5ad908","repo":"elastic/elasticsearch","slug":"index-name-beginning-with-a-dot-is-not-al","errorCode":null,"errorMessage":"Index [{}] name beginning with a dot (.) is not allowed","messagePattern":"Index \\[(.+?)\\] name beginning with a dot \\(\\.\\) is not allowed","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/dot-prefix-validation/src/main/java/org/elasticsearch/validation/DotPrefixValidator.java","lineNumber":174,"sourceCode":"\n    void validateIndices(@Nullable Set<String> indices) {\n        if (indices != null && isInternalRequest() == false) {\n            for (String index : indices) {\n                if (Strings.hasLength(index)) {\n                    char c = getFirstChar(index);\n                    if (c == '.') {\n                        final String strippedName = stripDateMath(index);\n                        if (IGNORED_INDEX_NAMES.contains(strippedName)) {\n                            continue;\n                        }\n                        if (systemIndices.isSystemName(strippedName)) {\n                            continue;\n                        }\n                        if (this.ignoredIndexPatterns.stream().anyMatch(p -> p.matcher(strippedName).matches())) {\n                            continue;\n                        }\n                        if (isStateless) {\n                            throw new IllegalArgumentException(\"Index [\" + index + \"] name beginning with a dot (.) is not allowed\");\n                        } else {\n                            deprecationLogger.warn(\n                                DeprecationCategory.INDICES,\n                                \"dot-prefix\",\n                                \"Index [{}] name begins with a dot (.), which is deprecated, \"\n                                    + \"and will not be allowed in a future Elasticsearch version.\",\n                                index\n                            );\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    private static char getFirstChar(String index) {\n        char c = index.charAt(0);\n        if (c == '<') {","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/dot-prefix-validation/src/main/java/org/elasticsearch/validation/DotPrefixValidator.java#L156-L192","documentation":"IllegalArgumentException from the dot-prefix validator when creating an index whose name starts with '.' and the name is not whitelisted (not a system index, not in IGNORED_INDEX_NAMES, not matching validate_ignored_dot_patterns) — but only when running stateless. On non-stateless clusters the same input is a deprecation warning instead of an error. Dot-prefixed names are reserved for internal/system use.","triggerScenarios":"PUT /my-.index-name or any create-index / bulk-to-new-index request whose resolved name begins with '.' on a stateless cluster, where the name is not a registered system index or ignored pattern.","commonSituations":"Migrating legacy dashboards/clients that use dot-prefixed index names to a stateless deployment; tools that historically wrote to '.kibana'-style names; expecting old lenient behavior.","solutions":["Rename the index to remove the leading dot","If the name is legitimate internal tooling, register it as a system index via SystemIndices","Or add a matching regex to cluster.indices.validate_ignored_dot_patterns to exempt it"],"exampleFix":"// before (stateless)\nPUT .myapp-logs-2025   // rejected\n// after\nPUT myapp-logs-2025    // no leading dot","handlingStrategy":"validation","validationCode":"// Reject dot-prefixed names before creating indices on stateless clusters:\nif (isStateless && name.startsWith(\".\") && !isSystemName(name) && !matchesIgnored(name)) {\n    throw new IllegalArgumentException(\"Index \" + name + \" name beginning with a dot is not allowed\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Adopt a naming convention without leading dots for user-facing indices","If a dot prefix is needed, register the name as a system index or add an ignore pattern","Test index creation in a stateless staging cluster before production rollout"],"tags":["dot-prefix","stateless","indices","validation","naming"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}