Creating a Static Website

What is a static website?

A static website is a website that is made up of HTML, CSS, and JavaScript files that are stored on a web server and served to users as-is. Unlike dynamic websites (like those made from Wordpress), which use databases and server-side programming to generate content on the fly, static websites arepre-built and cannot be modified by users.

Essentially, a static website is like a set of pages that are already printed out and cannot be changed. When a user visits a static website, they see exactly what the website owner has created, without any interactivity or dynamic content.

Overall, static websites are best suited for websites that don’t require complex functionality or frequent updates, but need to be fast, reliable, and secure. They are an excellent option for small businesses, individuals, or organizations that need a simple, effective online presence.

Who should use a static website?

Pros of using a static website:

Simplicity: Static websites are simple to set up, manage, and deploy, and do not require any special technical skills or knowledge.

Speed: Static websites load faster than dynamic websites like WordPress, which can improve user experience and search engine ranking.


Security: Static websites are less susceptible to security vulnerabilities and attacks than dynamic websites, as there are fewer components and plugins to exploit.

Cost: Static websites are generally less expensive to host and maintain than dynamic websites like WordPress, as they require fewer resources.

Reliability: Static websites are reliable and consistent, as they do not rely on external databases or plugins that can fail or break.

Cons of using a static website:

Limited functionality: Static websites are limited in terms of functionality and cannot provide dynamic features like e-commerce, user registration, or commenting.

Customization: Static websites are more difficult to customize and update than dynamic websites, as changes must be made to the HTML and CSS code.

Content management: Static websites do not have a built-in content management system like WordPress, which can make it difficult to manage and update content.

Scalability: Static websites may not be as easily scalable as dynamic websites, as they require manual updates to accommodate growth.

Search engine optimization (SEO): Static websites require additional manual optimization to improve their search engine ranking, as they do not have built-in SEO tools like WordPress.

Static hosting via Stanford Domains

To host a static website in cPanel, you can follow these steps:

  1. Log in to your cPanel account. The details of creating one are covered earlier in this guide.

  2. Once logged in, navigate to the “File Manager” option. It is usually located in the “Files” section.

  3. In the File Manager, you’ll see a directory structure. Look for the “public_html” directory or a similar folder. This is the root directory for your website.

  4. Click on the “public_html” directory to open it. If you want to host the website in a subdirectory, create a new folder within the “public_html” directory and enter that folder instead.

  5. Upload your static website files to the appropriate directory. To do this, click on the “Upload” button in the top toolbar. You can then select the files from your computer and upload them.

  6. Once the files are uploaded, you can access your website by entering your domain name in a web browser. For example, if your domain is “example.com,” enter “http://example.com” in the browser’s address bar.

  7. If you want to use a specific file as your website’s default page (e.g., “index.html”), make sure it is named correctly. By default, cPanel looks for an “index.html” file in the directory and displays it as the main page. You can also set custom default page settings in cPanel if needed.

That’s it! Your static website should now be hosted and accessible through your domain. Remember to update your DNS settings if necessary to ensure that your domain points to your hosting account.

Hosting via External Service

Although Stanford domains offers free website hosting services, there may be cases where you want to host a static website outside of Stanford domains. Some reasons for doing so may include:

  1. Flexibility: Hosting a website outside of Stanford domains gives you more flexibility to customize and control your website hosting environment.

  1. Cost: Hosting a website outside of Stanford domains may be more cost-effective, especially if you need a website with high traffic or complex functionality that requires more resources.

  2. Features: Hosting a website outside of Stanford domains may give you access to additional features, tools, and resources that are not available on Stanford’s platform.

If you do decide to host your static website outside of Stanford domains, there are several options available to you, including:

  • GitHub Pages: GitHub Pages is a free hosting service that allows you to host static websites directly from your GitHub repository.

  • Amazon S3: Amazon S3 is a cloud storage service that can be used to host static websites. It offers low cost and high scalability, making it a good option for websites with high traffic or storage needs.

  • Google Cloud Storage: Google Cloud Storage is another cloud storage service that can be used to host static websites. It offers low cost and high scalability, as well as advanced features like automatic backups and versioning.

  • Netlify: Netlify is a platform that offers hosting, build automation, and other tools for static websites. It is easy to use and offers advanced features like continuous deployment and serverless functions.

Overall, while Stanford domains offers free and reliable website hosting services, there may be cases where you want to host your static website outside of the platform. There are several options available, each with its own benefits and features, so it’s important to choose the one that best meets your needs and budget.