- Login into your Hostinger dashboard.
- Go to Domain portfolio. If you don't have a domain you can buy it here.
- Click on the domain's manage button that you want to add a sub-domain.
- Go to DNS / Namservers
- Enter your subdomain details.
- Select A (Address record)
- Name is your subdomain name = [subDomainName].yourwebsite.com
- Points to [Your IP Address]
- TTL (Time to Live), you can leave it at 14400
- Then click Add record.
- Done!
DNS record changes can take a few minutes to several hours (or even up to 48 hours) to propagate globally.
If your current browser doesn't load the website, use another browser to test it. Your browser might be caching the old DNS records.
Why does propagating DNS might take so long?
- TTL (Time to Live):
- The TTL value set on the DNS record determines how long DNS resolvers and caching servers should cache the record.
- If the TTL is set to a high value (e.g., 24 hours), it can take longer for changes to propagate because resolvers will continue to use the cached record until the TTL expires.
- Lowering the TTL in advance (e.g., to 300 seconds or 5 minutes) can speed up propagation.
- ISP and DNS Resolver Caching:
- Internet Service Providers (ISPs) and public DNS resolvers (like Google DNS, Cloudflare, etc.) may ignore the TTL and cache records for longer periods, delaying propagation.
- Global DNS Hierarchy:
- DNS changes must propagate through the global DNS system, including root servers, TLD (Top-Level Domain) servers, and authoritative name servers. This process takes time.
- Browser and Local Machine Caching:
- Your browser or operating system may also cache DNS records, which can delay the visibility of changes. Clearing your DNS cache can help you see the changes faster.