cPanel

How to Get the Public URL of a File in cPanel File Manager

If you’ve uploaded a file to your cPanel File Manager and need to access it via a web browser, follow these steps to find its public URL.

Step 1: Open File Manager

  1. Log in to your cPanel.
  2. Navigate to the File Manager under the “Files” section.

Step 2: Locate the File

  1. In the File Manager, open the public_html directory. This is the root directory for your website.
  2. Find the file you want to access.

Step 3: Construct the Public URL

There are two ways to get the file URL:

Method 1: Right-Click and Copy URL

  1. Right-click on the file.
  2. A pop-up will appear showing the file path. For example, /yourdomain.com/readme.html.
  3. Select and copy the text.
  4. Paste the text into your text editor. Replace the leading ‘/’ with ‘https://’. For example, https://yourdomain.com/readme.html. If your site is available at www., use https://www. instead.
  5. Copy the URL into your browser.

Method 2: Manually Construct the URL

Your file’s URL depends on its location:

  • If the file is in public_html, the URL will be:
    https://yourdomain.com/filename.ext
    

    Example: If you’ve uploaded logo.png directly to public_html, the URL will be:

    https://yourdomain.com/logo.png
    
  • If the file is inside a subfolder, the URL will include the folder name:
    https://yourdomain.com/foldername/filename.ext
    

    Example: If the file is in public_html/images/logo.png, the URL will be:

    https://yourdomain.com/images/logo.png
    

Step 4: Addon Domains and Subdomains

If you’re using addon domains or subdomains, their files are stored in separate directories within your cPanel account:

  • For an addon domain, the file path is usually:
    /home/yourcpaneluser/addondomain.com/
    

    The public URL will be:

    https://addondomain.com/filename.ext
    

    Example: If you’ve uploaded logo.png to /addondomain.com/images/, the URL will be:

    https://addondomain.com/images/logo.png
    
  • For a subdomain, the URL follows this structure:
    https://subdomain.yourdomain.com/filename.ext
    

    Example: If the subdomain is blog.yourdomain.com and the file is in public_html/blog/images/, the URL will be:

    https://blog.yourdomain.com/images/logo.png
    

Step 4: Verify File Permissions

If you can’t access the file via a browser, check the file permissions:

  • Files should have permissions set to 644.
  • Folders should have permissions set to 755.
  • You can change permissions in File Manager by right-clicking the file and selecting Change Permissions.

Step 5: Test the URL

Paste the file URL into your browser to confirm it’s accessible.

If you encounter any issues, ensure:

  • The file is inside public_html or a publicly accessible directory.
  • The file is not restricted by .htaccess rules.
  • Your domain is correctly pointing to your hosting account.

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London