HostGator.com » Support Portal
public_html folder
public_html
folder is the web root for your primary domain name.This means that
public_html
is the folder where you put all website files which you want to appear when someone types your main domain (the one you provided when you signed up for hosting).Or put another way, when someone types your domain name into their browser, whatever is in the
public_html
folder is what will be shown to them.Examples
For example, if you have a file calledindex.html
(or any of the other default filenames) in thepublic_html
folder, it will display that page.If you do no have a default file in the
public_html
folder (such as index.html
, default.html
, etc.), then a list of files in thepublic_html
folder will be shown.Path in File Manager (or in FTP)* | Corresponding URL in a Web Browser |
---|---|
/public_html/ | http://www.yourdomain.com/ |
/public_html/pagename.html | http://www.yourdomain.com/ |
/public_html/folder/ | http://www.yourdomain.com/ |
/public_html/folder/page.html | http://www.yourdomain.com/ |
Addon Domains & Subdomains
You can also create Addon domains and Subdomains, and these will use a folder insidepublic_html
.Examples
addondomain.com
and it will use a subfolder similar to /public_html/addondomain. com/
(unless you specified otherwise).Or you could create a Subdomain called
gatorhost.yourdomain.com
/public_html/gatorhost/
(If
gatorhost.yourdomain.com
is defined as a subdomain, and addondomain.com
is defined as an addon domain, then the following examples apply:Path in File Manager (or in FTP)* | Corresponding URL in a Web Browser |
---|---|
/public_html/gatorhost/ | http://gatorhost.yourdomain. |
/public_html/addondomain.com/ | http://www.addondomain.com/ |
If you do not want additional domains to be subfolders of
public_html
, then reseller, VPS or dedicated hosting is a better solution, since you can put each domain in its own cPanel to keep it separate from other domains. Shared accounts only get one cPanel, which is why all addon domains are subfolders of the public_html
folder.Permissions
Thepublic_html
folder should always have 0750 permissions.All folders inside the
public_html
folder should have 0755 permissions.All files inside the
public_html
folder should have 0755 or 0644 permissions.Some websites and scripts may advise you to use 777 permissions, however, our servers are configured to use 755 for the same purpose instead, since it is more secure. Permissions of 777 on any file or folder will cause the file to be inaccessible. Use 755 instead of 777.
*The full path is actually
/home/username/ public_html/
(where username is your cPanel username) rather than /public_html/
but in most places you will see/public_html/
instead of the full path, since it assumes you know you are in your own home directory.cPanel is a popular web hosting control panel that helps you manage your hosting account and assists you in creating web sites, managing e-mail addresses, & installing applications to a server.
cPanel is available on all HostGator Linux hosting plans, includingShared Hosting, Reseller Hosting, VPS and Linux Dedicated Servers.
Article Comments
Sarah
Maybe a silly question but... How is this folder different than the www folder?
Posted: August 30, 2010
HostGator
They are the same folder.
Posted: August 30, 2010
Nathan
Is it possible to have the primary domain files inside a subdomain folder? It makes a real mess having the primary files mixed with the add-on domain folders.
Posted: October 11, 2010
HostGator
That is not something HostGator will setup on a shared server, but you can accomplish this by creating a new folder, moving the primary domain's content to inside said folder, and then creating a Redirect from primarydomain.com to primarydomain.com/newfolder.
Posted: October 15, 2010
HostGator
Thank you for your comments. Just a quick reminder that the comments on this page are not monitored by technical support staff, and that for support issues, it is best to contact us by live chat, phone or email so we can assist you right away.Although comments are not monitored by technical support staff, they are moderated and read by technical writers. Comments will need to be approved by a moderator before appearing.
Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.
Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.
Posted: December 13, 2011 (Global Reply)
Post Comment
- Our Services
- Web Hosting
- Reseller Hosting
- VPS Hosting
- Dedicated Servers
- Domain Names
- Application Hosting
- Windows Hosting
- Help and Support
- Support Portal
- Video Tutorials
- Forums
- Ticket System
- Billing System
- Live Chat
Copyright © 2002-2012 HostGator.com Web Hosting | Sitemap
nice blog post. this large number of valuable information here in the post
ReplyDeletebpo jobs in bangalore
teaching jobs in bangalore
today walkins in bangalore
night shift jobs in bangalore
nice blog post. this is very knowledge base post
ReplyDeleteLatest Walkins in Delhi Ncr