Imagine this — you’ve recently created a new website to host your content, and you’re excited to see it go live. You can’t wait to dive into SEO and begin ranking for keywords, and attract an audience to your brand.
But then a friend emails you and says, “Hey, is there a reason I see this when I click on your website?”
Image courtesy of Wikipedia
Undoubtedly, a 403 Forbidden Message is cause for immediate concern — how many potential viewers are you losing, as they come across your website just to find this message?
Fortunately, there are a few quick-and-easy solutions to a 403 error. Here, we’ll explain the top three, so you can get your site up and running.
A 403 Forbidden error is an HTTP status code sent to users by an HTTP server when a user is trying to access a URL. It means the page you were trying to reach is forbidden for one of two reasons — either there is a removal or restriction of access permissions from the client-side, or there’s an accidental misconfiguration of the web server.
How to Fix 403 Errors
1. Permission or ownership errors.
Your site might be showing a 403 Forbidden error because of permission issues. If you’ve configured your web server, you’ll want to add the server to the www-data group, and set ownership of /var/www to the www-data user and www-data group.
You’ll then want to make sure your directories are set to 755, your files are set to 644, and your dynamic content is set to 700.
2. Make sure you have an index page.
Your website’s home page must be called index.html or index.php — if it’s not, you should rename the homepage to include one of those URL names.
Alternatively, you can upload an index page to your httpdocs directory, and then set up a redirect on the index page to your real homepage.
3. You haven’t uploaded your website content to the correct directory on your server.
Lastly, you might see a 403 forbidden message if you haven’t correctly uploaded your content to the directory on your server.
There are several different FTP clients you might’ve chosen to host your domain — let’s say you chose FileZilla, which is free and available for Windows, Mac, and Linux.
To publish your content online, you’ll need to put your files into the Public-htdocs directory (if you’re using FileZilla — these instructions will vary if you use a different FTP client). Once you’ve dragged-and-dropped your files into the directory, you should search your website’s URL to double-check they now appear online.
If you’re in your FTP server and don’t see the httpdocs directory, you can create a file within the directory with this title, which could also solve the issue.