How to Create a Domain-Based DFS Namespace
Applies to: Windows Server 2019, 2022 and 2025.
A domain-based DFS namespace gives users a stable UNC path while folder targets can move between file servers.
Storage changes can cause data loss or access outages. Use tested backups, maintenance windows and representative access tests. Managed Windows VPS services are available at networkmanager.info.
Prerequisites
- Install DFS Namespace role services.
- Prepare and share target folders.
- Verify AD and DNS health.
- Choose namespace administrators and access groups.
Procedure
Step 1: Install role
Add namespace and tools.
Install-WindowsFeature FS-DFS-Namespace,RSAT-DFS-Mgmt-ConStep 2: Create root target share
Create an SMB share such as \FS01\Public on the first namespace server.
Step 3: Create namespace
Use a domain V2 root.
New-DfsnRoot -Path '\\corp.example\Public' -TargetPath '\\FS01\Public' -Type DomainV2Step 4: Add a folder
Create a logical path.
New-DfsnFolder -Path '\\corp.example\Public\Finance' -TargetPath '\\FS01\Finance'Step 5: Test referral
Connect from representative clients in each site.
Verification
List namespace roots, folders and targets.
Get-DfsnRoot
Get-DfsnFolder -Path '\\corp.example\Public\*'
Get-DfsnFolderTarget -Path '\\corp.example\Public\Finance'Rollback and recovery
Remove folder targets before folders and remove the namespace root only after migrating users and scripts.
Operational notes
DFS Namespace provides referrals; it does not replicate file data unless DFS Replication is configured separately.