Your absolute path is the full directory path to your website files on the server. It’s essential for configuring applications, scripts, or anything that requires precise file locations on the server. On UnderHost hosting, the typical absolute path follows this format:
Absolute Path Format
/home/username/public_html/
Here’s a breakdown of the components:
/home/: The root directory for all hosting accounts.username: This is your unique cPanel username.public_html/: The directory where your main website files are stored.
Examples of Absolute Paths
- Main Domain:
/home/username/public_html/ - Addon Domains:
/home/username/addondomain/ - Subdomains:
/home/username/public_html/subdomain/
Note: Replace username with your actual cPanel username, and addondomain or subdomain with the folder name specific to your additional domains or subdomains.
How to Find Your Absolute Path
If you’re unsure of your specific absolute path, you can confirm it by following these steps:
1. Check in cPanel
- Log in to your cPanel account through the CustomerPanel.
- Look for "File Manager" in the Files section and open it.
- The root folder for your files (
public_html) will display your absolute path in the address bar at the top.
2. Use a PHP Script
If you’re setting up an application or need precise confirmation, create a PHP file to display the absolute path:
- Create a file named
pathinfo.phpin yourpublic_htmlfolder. - Add this code:
<?php echo __DIR__; ?> - Visit the file in your browser (e.g.,
https://yourdomain.com/pathinfo.php). It will display your absolute path. - Delete the file after use to ensure security.
Why Do You Need Your Absolute Path?
- Script Configuration: Applications like WordPress, Joomla, or custom scripts often require the absolute path to locate files and directories.
- Error Troubleshooting: Knowing your path can help identify issues when a script fails to find necessary files.
- Backups: Use the absolute path to correctly point to files or folders during automated backup processes.
Need Help?
If you need further assistance identifying your absolute path or configuring your website, contact our support team through the CustomerPanel. We’re here to help!