When managing multiple websites or migrating accounts, it’s often necessary to preview a site before the domain’s DNS is fully propagated. WHM offers a simple solution by allowing temporary URL access via the server IP. This guide will show you how to enable Temporary URL for WHM easily and securely.
For more in-depth WHM and cPanel guides, visit our Hostrago Knowledge Base.
What is a Temporary URL in WHM?
A Temporary URL allows you to access websites hosted on your server by using the server’s IP address combined with the cPanel username. This method is extremely helpful when:
- DNS changes haven’t propagated.
- Websites are being migrated to a new server.
- Developers need to preview websites before going live.
How to Enable Temporary URL for WHM (Step-by-Step)
Step 1: Access WHM as Root User
- Open your browser and enter:
https://your-server-ip:2087
- Enter your Root Username and Password.
- Click Log In.
Step 2: Open Tweak Settings

- In WHM, type Tweak Settings into the search bar.
- Click on Tweak Settings from the results.
Step 3: Modify mod_userdir Protection
- Under Tweak Settings, go to the Security tab.
- Look for the option:
“Enable mod_userdir Protection” - By default, this may be enabled (checked) for security.
- Uncheck this box to disable the protection.
Note: Disabling this allows temporary URL access. Always re-enable after testing for improved server security.
Step 4: Access Website via Temporary URL
Now you can access any account’s website via:
http://your-server-ip/~username
Example:
http://123.456.789.100/~cpanelusername
Replace your-server-ip
with your actual server IP and username
with the cPanel username.
Step 5: Re-Enable mod_userdir Protection (Highly Recommended)

- Once your testing is complete, go back to Tweak Settings.
- Check Enable mod_userdir Protection again.
- Click Save to secure your server.
Why Re-Enable mod_userdir Protection?
Keeping mod_userdir disabled permanently may expose:
- Sensitive data
- Security vulnerabilities
- Potential performance issues
Always enable mod_userdir protection after you’re done using temporary URLs.
Need Assistance? Contact Hostrago Support
If you’re unsure about any step or face difficulties, our support team is ready to help:
👉 Contact Hostrago Support
For more tutorials like this, explore our Hostrago Knowledge Base.
Frequently Asked Questions (FAQ)
1. What is a Temporary URL in WHM?
A Temporary URL in WHM allows you to access a website using your server’s IP address combined with the cPanel username. This is useful when DNS changes are pending or during website migrations.
2. How to Enable Temporary URL for WHM?
To enable Temporary URL in WHM:
- Log in to WHM as root.
- Go to Tweak Settings.
- Under the Security tab, disable mod_userdir Protection.
- Access your website using:
http://your-server-ip/~username
3. Why is mod_userdir Protection enabled by default?
WHM enables mod_userdir Protection by default for security reasons. Disabling it allows public access to user directories, which may expose sensitive data if not managed properly.
4. Is it safe to keep Temporary URL enabled permanently?
No, it is not recommended. Leaving mod_userdir Protection disabled long-term can pose security risks. Always re-enable it after testing or troubleshooting is complete.
5. Can I enable Temporary URL if I don’t have WHM access?
If you don’t have WHM access, contact your hosting provider (like Hostrago) to enable Temporary URL access for your account.
6. What is the format of the Temporary URL?The format is:
http://your-server-ip/~username
For example:
http://192.168.1.100/~cpaneluser
7. What are the alternatives if I can’t enable Temporary URL?
- Use a staging environment provided by your hosting provider.
- Edit your computer’s hosts file to preview the site locally.
- Ask your host for a preview link.
Conclusion
How to Enable Temporary URL for WHM is a simple, effective way to test your websites during migrations or DNS changes. Just remember to disable it when you’re finished for maximum server security.
👉 Learn more with our growing library of Hostrago Knowledge Base articles.