Difference between WWW and PUBLIC_HTML


When it comes to web hosting and website building, you may have heard the terms "WWW" and "PUBLIC_HTML" before. First, PUBLIC_HTML is the root directory for your website, while WWW is a subdirectory. This means that anything placed in the PUBLIC_HTML directory will be publicly accessible, while anything in the WWW directory will not be. Second, the WWW directory is usually used for storing website files that are not meant to be directly accessed by users, such as images or other media files.

The PUBLIC_HTML directory is typically used for storing the main pages of your website that users will access. Finally, the permissions for each directory are usually different. The WWW directory is typically set to allow read and write access by the web server user, while the PUBLIC_HTML directory is usually set to allow read and write access by the owner only. This difference in permissions ensures that only authorized users can modify files in the PUBLIC_HTML directory, preventing anyone from maliciously altering your website's files.

Read this article to find out more about WWW and Public Html and how they are different from each other.

What is WWW?

WWW stands for "World Wide Web," and it is a network of related publications and resources that are connected through hyperlinks and URLs. As we know, the web will be a subset of the internet, and the word is frequently used to mean the internet altogether. It includes just those resources that can be accessed via HTTP, the protocol of the world wide web.

WWW is one of the most popular web servers; it is easy to set up and use, and it has a number of functions. One of the drawbacks is that they are not able to manage the heavy traffic and are slow.

World Wide Web contains all the files for HTML, CSS, and the other elements of your site. It is a place where you can store all the files that make up your site, compared to the documents folder on your computer. One can request access to the files in your html folder and type your site URL in the browser.

What is Public_HTML?

The folder "Public HTML" is where you keep the files for your website. This is where you will store all of the files that you want website visitors to be able to see. Images and documents that are not intended for visitors to see are kept in the WWW folder.

Public_HTML is typically readable by anyone around the world, whereas WWW is not. This means that while everyone can access the files or folders in the PUBLIC HTML directory, only the server itself can access the files in the WWW directory. This is pivotal because it enables you to manage who has access to the files on your website.

Everything that is saved in the Public HTML subdirectory will show up when people type a domain name into their web browser. You must first log in to cPanel in order to access the public HTML of your domain; then, under the file section, select the option for file management. The Public HTML folder may be found under the root directory of the main domain. Addon domains and addon subdomains you create will be kept in the Public HTML folder.

Last but not least, it's important to note that certain hosting companies offer different hosting plans for WWW and PUBLIC HTML. This implies that you can have two distinct websites with two distinct sets of files on two distinct disciplines (or subdomains). Still, this can be helpful if you want to keep your development and product environments distinct.

Public HTML servers have several benefits over the latter. They are capable of handling more traffic and being speedier. They might be more challenging to set up and operate, though.

Differences between WWW and PUBLIC_HTML

The following table highlights the major differences between WWW and PUBLIC_HTML −

Characteristics

WWW

PUBLIC_HTML

Definition

The WWW stands for World Wide Web and it is a network of related publications and resources which are connected through hyperlinks and URLs.

The folder Public HTML is where you keep the files for your website. This is where you will store all of the files that you want website visitors to be able to see.

Access

It can be accessed through browsers like Google Chrome, Firefox etc.,

It can be accessed through cPanel of your account

Type

It is a Symbolic link type

It is a directory type

Physical Existence

Not a physical existence but it is a virtual one

It is a physical existence

Example

Tutorialspoint.com

/home/user/public_html

Conclusion

Although they serve different purposes, the "www" and "public_html" directories are both helpful for hosting files. When you want to make your website publicly accessible, use the www directory; otherwise use the public_html directory. To save your files in the correct location, it's crucial to comprehend the distinctions between these two directories. With a little knowledge and a few straightforward steps, you can ensure that your site functions properly and smoothly by making good use of both of these files.

Updated on: 06-Mar-2023

448 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements