Skip to main content

How to Migrate Your Website to a Free Hosting Service with a Custom Subdomain

Follow this step-by-step guide to migrate your website to a free hosting service with a custom subdomain, including setting up DNS records and configuring your website. This guide will help you move your website to a free hosting service with minimal downtime.

Written by Mayank Baswal

Founder of is-cool-me · DNS & Platform Infrastructure

Mayank Baswal maintains the is-cool-me platform and writes technical guides focused on DNS configuration, subdomain infrastructure, SSL troubleshooting, deployment workflows, and platform reliability.

Reviewed by is-cool-me Technical Review
## Introduction Migrating a website to a free hosting service with a custom subdomain can be a daunting task, especially for developers who are new to the process. However, with the right guidance, it can be a straightforward and cost-effective way to host a website. Free hosting services like is-cool-me offer a range of benefits, including scalability, reliability, and ease of use. In this guide, we will walk through the process of migrating a website to a free hosting service with a custom subdomain, using myproject.is-pro.dev as an example. We will cover the prerequisites, step-by-step instructions, configuration options, common pitfalls, and best practices to ensure a successful migration. The motivation behind migrating to a free hosting service is often driven by the need for cost savings, improved scalability, and enhanced reliability. With a custom subdomain, developers can maintain control over their website's branding and identity. Moreover, free hosting services often provide a range of tools and features that can simplify the development and deployment process. For instance, is-cool-me offers a range of templates, APIs, and integrations that can be used to build and deploy a website quickly and efficiently. ## Prerequisites Before starting the migration process, there are several prerequisites that need to be met. Firstly, developers need to have a website that is ready to be migrated. This can be a static website, a dynamic website, or a web application. Secondly, developers need to have a free hosting service account, such as is-cool-me. Thirdly, developers need to have a custom subdomain set up, such as myproject.is-pro.dev. Finally, developers need to have a basic understanding of DNS configuration, website deployment, and troubleshooting. To set up a custom subdomain on is-cool-me, developers can follow these steps: * Log in to their is-cool-me account * Click on the "Domains" tab * Click on the "Add Domain" button * Enter the custom subdomain, such as myproject.is-pro.dev * Verify the domain ownership using DNS records or email verification ## Step-by-step instructions Migrating a website to a free hosting service with a custom subdomain involves several steps. Here are the detailed instructions: 1. **Set up the custom subdomain**: As mentioned earlier, developers need to set up a custom subdomain on is-cool-me. This involves verifying the domain ownership and setting up the DNS records. 2. **Create a new repository**: Developers need to create a new repository on is-cool-me to store their website's code. This can be done by clicking on the "Create Repository" button and following the prompts. 3. **Upload the website code**: Developers need to upload their website's code to the new repository. This can be done using the is-cool-me dashboard or using a version control system like Git. 4. **Configure the website**: Developers need to configure their website to work with the custom subdomain. This involves updating the website's configuration files, such as the `index.html` file or the `nginx.conf` file. 5. **Deploy the website**: Developers need to deploy their website to the custom subdomain. This can be done using the is-cool-me dashboard or using a deployment tool like GitHub Actions. Here is an example of how to deploy a website using GitHub Actions: ```yml name: Deploy to is-cool-me on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Deploy to is-cool-me uses: is-cool-me/deploy@v1 with: api-key: ${{ secrets.IS_COOL_ME_API_KEY }} repository: myproject branch: main ``` ## Configuration deep-dive The configuration options for a custom subdomain on is-cool-me are extensive. Here are some of the key options: * **DNS configuration**: Developers can configure their DNS records to point to the custom subdomain. For example, the `A` record for `myproject.is-pro.dev` can be set to `192.0.2.1`. * **SSL/TLS configuration**: Developers can configure their SSL/TLS certificates to secure their website. For example, the `SSL` certificate for `myproject.is-pro.dev` can be set to `letsencrypt`. * **Website configuration**: Developers can configure their website's settings, such as the `index.html` file or the `nginx.conf` file. For example, the `index.html` file for `myproject.is-pro.dev` can be set to `/var/www/html/index.html`. Here is an example of how to configure the DNS records for a custom subdomain: ```bash $ dig +short myproject.is-pro.dev 192.0.2.1 $ dig +short -x 192.0.2.1 myproject.is-pro.dev ``` ## Common pitfalls and solutions There are several common pitfalls that developers may encounter when migrating their website to a free hosting service with a custom subdomain. Here are some of the most common pitfalls and their solutions: * **DNS configuration errors**: One of the most common pitfalls is DNS configuration errors. To solve this, developers can use a DNS checker tool to verify their DNS records. * **SSL/TLS configuration errors**: Another common pitfall is SSL/TLS configuration errors. To solve this, developers can use an SSL/TLS checker tool to verify their SSL/TLS certificates. * **Website configuration errors**: Website configuration errors are also common. To solve this, developers can check their website's configuration files, such as the `index.html` file or the `nginx.conf` file. * **Deployment errors**: Deployment errors can also occur. To solve this, developers can check their deployment logs to identify the issue. * **Performance issues**: Performance issues can also arise. To solve this, developers can use a performance monitoring tool to identify the bottleneck. Here is an example of how to troubleshoot a DNS configuration error: ```bash $ dig +short myproject.is-pro.dev $ dig +short -x 192.0.2.1 ``` ## Best practices To ensure a successful migration, developers should follow best practices. Here are some of the most important best practices: * **Use a version control system**: Developers should use a version control system, such as Git, to manage their website's code. * **Use a deployment tool**: Developers should use a deployment tool, such as GitHub Actions, to deploy their website. * **Monitor performance**: Developers should monitor their website's performance using a performance monitoring tool. * **Use SSL/TLS**: Developers should use SSL/TLS to secure their website. * **Use a DNS checker tool**: Developers should use a DNS checker tool to verify their DNS records. Here is an example of how to use a version control system: ```bash $ git init $ git add . $ git commit -m "Initial commit" $ git push -u origin main ``` ## Troubleshooting section Troubleshooting is an essential part of the migration process. Here are some diagnostic steps to identify and fix issues: * **Check the deployment logs**: Developers should check their deployment logs to identify any issues. * **Check the website's configuration files**: Developers should check their website's configuration files, such as the `index.html` file or the `nginx.conf` file. * **Check the DNS records**: Developers should check their DNS records to verify that they are correct. * **Check the SSL/TLS certificates**: Developers should check their SSL/TLS certificates to verify that they are valid. * **Use a debugging tool**: Developers should use a debugging tool, such as a browser's developer tools, to identify any issues. Here is an example of how to check the deployment logs: ```bash $ git log $ git status $ git diff ``` ## Deployment scenario from operations Here is a complete real-world example of a deployment scenario: * **Website**: myproject.is-pro.dev * **Repository**: myproject * **Branch**: main * **Deployment tool**: GitHub Actions * **DNS records**: `A` record for `myproject.is-pro.dev` set to `192.0.2.1` * **SSL/TLS certificates**: `letsencrypt` Here is an example of how to deploy the website using GitHub Actions: ```yml name: Deploy to is-cool-me on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Deploy to is-cool-me uses: is-cool-me/deploy@v1 with: api-key: ${{ secrets.IS_COOL_ME_API_KEY }} repository: myproject branch: main ``` ## Common mistakes Here are some common mistakes to avoid: * **Incorrect DNS records**: Incorrect DNS records can cause issues with the website's accessibility. * **Invalid SSL/TLS certificates**: Invalid SSL/TLS certificates can cause issues with the website's security. * **Incorrect website configuration**: Incorrect website configuration can cause issues with the website's functionality. * **Deployment errors**: Deployment errors can cause issues with the website's availability. * **Performance issues**: Performance issues can cause issues with the website's usability. ## How to verify it works Here are some verification checks to ensure that the website is working correctly: 1. **Check the website's accessibility**: Developers should check that the website is accessible by visiting the website's URL. 2. **Check the website's security**: Developers should check that the website is secure by verifying the SSL/TLS certificates. 3. **Check the website's functionality**: Developers should check that the website is functioning correctly by testing the website's features. 4. **Check the website's performance**: Developers should check that the website is performing well by using a performance monitoring tool. 5. **Check the deployment logs**: Developers should check the deployment logs to verify that the deployment was successful. ## Conclusion with next steps In conclusion, migrating a website to a free hosting service with a custom subdomain can be a complex process. However, by following the steps outlined in this guide, developers can ensure a successful migration. The next steps are to monitor the website's performance, fix any issues that arise, and continue to improve the website's functionality and security. ## FAQ Here are some frequently asked questions: **Q: What is a custom subdomain?** A: A custom subdomain is a subdomain that is specific to a website or application. For example, myproject.is-pro.dev is a custom subdomain. **Q: How do I set up a custom subdomain on is-cool-me?** A: To set up a custom subdomain on is-cool-me, developers need to log in to their account, click on the "Domains" tab, click on the "Add Domain" button, and enter the custom subdomain. **Q: What are the benefits of using a free hosting service?** A: The benefits of using a free hosting service include cost savings, improved scalability, and enhanced reliability. **Q: How do I deploy my website to a free hosting service?** A: To deploy a website to a free hosting service, developers can use a deployment tool, such as GitHub Actions, or upload their website's code directly to the hosting service. **Q: How do I troubleshoot issues with my website?** A: To troubleshoot issues with a website, developers can check the deployment logs, check the website's configuration files, check the DNS records, and use a debugging tool.
Share this article Share on X Share on LinkedIn
Previous A Step-by-Step Guide to Setting Up a Secure Subdomain for E-commerce