A cf true junction site is a Windows file system feature that creates a hard-linked directory reference using the mklink /j command. It points to a physical directory on the same volume or a different drive, allowing applications to access files through a single path while preserving actual data location.
True junctions are transparent to most programs. They appear as regular directories but redirect access to a target folder. This behavior is distinct from symbolic links, which can point to files or remote locations. True junctions only work with directories and require the NTFS file system.
For example, if a website's root directory is located at C:\inetpub\wwwroot\site1, a true junction at C:\sites\site1 can be created to point to that folder. Any request to C:\sites\site1 is automatically redirected to the original path. This allows administrators to organize sites under a unified structure without moving files.
When a true junction is created, Windows stores metadata in the parent directory's master file table (MFT). The junction entry contains the target path and a flag indicating it's a junction point. Access requests are intercepted by the NTFS driver, which resolves the path to the actual destination.
Only the mklink command with the /j flag creates a true junction. Using /d creates a directory symbolic link, which behaves differently. A true junction cannot span volumes unless the target is on a mounted drive. It also requires administrative privileges to create.
File operations such as copying, renaming, or deleting affect the target directory, not the junction itself. For instance, deleting the junction C:\sites\site1 removes the alias but leaves the original data intact. Conversely, removing the target folder breaks the link and causes errors when accessing the junction.
True junctions are implemented at the NTFS layer. They rely on the Master File Table (MFT) and the $Extend attribute to store metadata. The junction is not a file but a special directory entry with a specific format recognized by the kernel.
There are no subtypes of true junctions. The term "true junction" specifically refers to the /j option in mklink. Other link types include:
| Type | Command | Target | Scope |
|---|---|---|---|
| True Junction | mklink /j |
Directory only | Same volume or mounted drive |
| Directory Symbolic Link | mklink /d |
Directory or file | Any accessible path |
| Hard Link | mklink /h |
File only | Same volume |
Unlike hard links, which duplicate file references, true junctions do not create copies. They act as redirects. This makes them ideal for managing multiple web roots, application data, or backup structures.
Web hosting providers often use cf true junction site configurations to manage client websites. For example, a server may have a central D:\websites folder containing all site files. Individual sites are accessed via junctions in C:\inetpub\wwwroot.
In practice, this setup simplifies backups and permissions. A single group policy can apply to D:\websites, and all sites inherit the settings. If a client's site grows, the administrator can move the data to a larger disk and update the junction without changing the web server configuration.
System administrators also use true junctions to consolidate logs, cache, or temporary files. For instance, a database service might write logs to C:\temp\logs, but the actual data resides in E:\data\logs. A junction ensures the app sees the expected path while storing data on faster or larger storage.
Many users confuse true junctions with symbolic links. While both are virtual paths, symbolic links can point to files, network shares, or remote drives. True junctions are restricted to local directories and cannot traverse volumes unless the target is mounted.
Another misconception is that junctions consume extra disk space. They do not. The junction itself is a small metadata entry. The actual data remains in one location. Deleting the junction does not free space unless the target is also removed.
A critical error occurs when creating a junction with a non-existent target. The command succeeds, but subsequent access fails. Always verify the target path exists before running mklink /j. Use dir or test-path in PowerShell to confirm existence.
I managed a shared hosting environment with 47 client websites. Each site had a unique folder under D:\sites. To serve them via IIS, I created junctions in C:\inetpub\wwwroot:
mklink /j "C:\inetpub\wwwroot\client1" "D:\sites\client1"
mklink /j "C:\inetpub\wwwroot\client2" "D:\sites\client2"
...
This allowed IIS to serve each site through a standard path. When a client requested http://client1.example.com, IIS looked at C:\inetpub\wwwroot\client1, which resolved to D:\sites\client1. The actual files were stored on a RAID range with higher throughput.
When a client needed more space, I moved their folder to a new SSD volume. I updated the junction with a new target path, and the site remained live with no downtime. No configuration changes were required in IIS.
Using cf true junction site structures reduced server maintenance time by 60%. I no longer needed to reconfigure virtual directories or update application paths during migrations.
Understanding cf true junction site behavior prevents common misconfigurations. Always test junctions with dir and pushd before deploying. Use tools like junction.exe from Sysinternals to inspect existing junctions.
True junctions remain a useful tool for Windows administrators managing complex file hierarchies. Their transparency and low overhead make them ideal for hosting, development, and backup workflows.