Namespace index
In OPC UA, a namespace index is the UInt16 position of a namespace URI in a server's NamespaceArray, and it is the first half of every NodeId and QualifiedName. Index 0 is always the OPC UA core namespace. Every other index is server-specific and may change between restarts.
A local shorthand, nothing more
The index exists purely to keep NodeIds small on the wire: sending 2 instead of a 40-character URI in every request matters when a subscription reports thousands of values a second. Its meaning is scoped to one server and, strictly, to one session's view of that server's namespace table. Nothing about an index is portable between servers, and two servers exposing the same information model will commonly give it different indexes.
Which indexes are conventional
Index 0 is normatively http://opcfoundation.org/UA/, so all standard nodes are ns=0. By strong convention index 1 is the server's own local namespace, usually equal to its ApplicationUri, which is where a server puts nodes it invented itself. From index 2 upwards the order depends on the load order of nodesets and on vendor implementation, and that is exactly where instability begins.
Where indexes also appear
Namespace indexes are not only in NodeIds. A QualifiedName - so every BrowseName - carries one. ServerUris, and in some models RolePermissions and event fields, refer to namespaces too. A client that resolves indexes for NodeIds but hardcodes the prefix in a browse path such as 4:Mixer_01 has only fixed half the problem.
Example
The same information model, two servers, two indexes
Server A - umati sample server
[0] http://opcfoundation.org/UA/
[1] http://opcfoundation.org/UA/DI/
[2] http://opcfoundation.org/UA/Machinery/
MachineryItemState -> ns=2
Server B - vendor PLC
[0] http://opcfoundation.org/UA/
[1] urn:PLC-01:UA:Server
[2] http://opcfoundation.org/UA/DI/
[3] http://opcfoundation.org/UA/Machinery/
MachineryItemState -> ns=3
One client, one config, only if it keys on the URI.
Defined in: Part 3 - Address Space Model, NodeId and QualifiedName; the NamespaceArray Variable is defined in Part 5.
Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.