In Progress 403

Discussion in 'Free Hosting' started by jakenetx, Jan 12, 2021.

  1. jakenetx

    jakenetx New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I get a 403 when trying to get to my site. I can log into cpanel fine and my email still works. Your support pages suggest it may be "might be being blocked by mod_security". Please advise. Thanks.
     
  2. garrettroyce

    garrettroyce Community Support Community Support

    Messages:
    5,284
    Likes Received:
    204
    Trophy Points:
    63
    403 can come from improper permissions or missing indexes option.

    You should have all of your files in a folder like ~/domains/[your domain name]/public_html and maybe there are some subfolders, which is ok. All of the folders (domains, public_html, subfolders, etc.) all have to be permission of 0644 (owner read/write, everyone else read only) and folders must be 0755 (owner read/write/execute, everyone else read and execute).

    If you want to go to yoursite.example (note that there's no folder name at the end) and you want to see a list of files in that folder, you need to add this line to ~/domains/[your domain name]/public_html/.htaccess (the file is a period, followed by htaccess) and add this line:

    Code:
    Options +Indexes
    
    This will show a list of all the files and subfolders for your website. This is considered a mild security risk because you may have files that people shouldn't know they exist.

    The normal way to do things is to NOT use Options +Indexes. Instead, create a file called index.SOMETHING where SOMETHING can be htm, html, or php. This file will show up either when you go to yoursite.example or when you go to yoursite.example/index.SOMETHING
     
  3. spacresx

    spacresx Active Member

    Messages:
    793
    Likes Received:
    49
    Trophy Points:
    28
    Just to add to what garrettroyce said,

    another option for the .htaccess file that might work for you,
    is to add this.

    DirectoryIndex index.php
    IndexIgnore *

    you can change the index.php to your file name, index.htm ,
    index.html or index.php

    the IndexIgnore * option will hide any files from showing
    when you go to yoursite.example.

    i use this in my htaccess file without any problems.
     

Share This Page