How to Fix a 403 Forbidden Error on Hostking
A 403 Forbidden error means your web server is refusing to serve the requested page. Unlike a 404 (page not found), the page exists — but access is being blocked. Here are the most common causes and how to fix each one.
Cause 1: File or Folder Permissions Are Wrong
Incorrect file permissions are the most common cause. Web files should be set to 644 and folders to 755.
To fix via DirectAdmin File Manager:
- Log into DirectAdmin
- Open File Manager
- Navigate to your
public_htmlfolder - Select all files and folders
- Right-click and choose Change Permissions
- Set files to 644 and folders to 755
- Click Save and test your site
To fix via SSH Terminal (advanced):
Log into the DirectAdmin terminal and run:
find /home/username/domains/yourdomain.com/public_html -type f -exec chmod 644 {} \;
find /home/username/domains/yourdomain.com/public_html -type d -exec chmod 755 {} \;
Replace username and yourdomain.com with your actual values.
Cause 2: Missing private_html Symlink
DirectAdmin uses a symlink called private_html that points to public_html. If this symlink is accidentally deleted, a 403 error can appear.
To fix via SSH Terminal:
- In DirectAdmin, click the Terminal icon
- Navigate to your domain folder:
cd /home/yourusername/domains/yourdomain.com
- Recreate the symlink:
ln -s public_html private_html
- Fix ownership:
chown -h username.username private_html
- Wait 1 minute and test your site
If you're not comfortable using the terminal, open a support ticket and our team will fix this for you.
Cause 3: Resource Limit Exceeded
If your hosting account has exceeded its CPU or resource limit, your site may temporarily show a 403 error. Log into DirectAdmin and check your resource usage. If you're consistently hitting your limits, upgrading your hosting plan will resolve it. See: What Does the CPU Limit Mean?
Cause 4: Account Suspended (Unpaid Invoice)
If your hosting account has been suspended due to a missed payment, all websites on that account will show a 403 error. Log into my.hostking.host, check for outstanding invoices and pay them. Your account will be reactivated automatically once payment is confirmed.
Cause 5: Hacked or Malicious Files
Malware or hacked files can sometimes cause permission changes that result in a 403 error. If you suspect your site has been compromised:
- Log into WordPress admin if accessible
- Install Wordfence and run a full scan
- Follow the recommendations to clean infected files
See our article: My WordPress Site Was Hacked — How to Clean and Recover It
Cause 6: .htaccess Error
A misconfigured .htaccess file can cause 403 errors. To test if this is the cause, rename .htaccess to .htaccess_backup temporarily via File Manager. If the site loads, the .htaccess file is the problem. Restore it and remove any recently added rules.
Still Getting a 403 Error?
Open a support ticket at my.hostking.host and include your domain name and the URL showing the 403 error. Our team is available every day from 7am to 10pm.
