How to Set Up DNS and HTTPS for WooCommerce
What DNS records a WooCommerce shop needs, how to get and renew an HTTPS certificate, and how to avoid redirect loops, mixed content and broken checkout pages.
10 min readUpdated Nov 27, 2026By XPASS Editorial Team

A WooCommerce shop needs two things from the internet's plumbing before customers can trust it. The first is DNS, the system that turns your shop's name into the address of the server. The second is HTTPS, which encrypts the connection and proves that the visitor reached the real site and not an impostor. They are set up in different places, by different mechanisms, but they depend on each other: a certificate can only be issued for a name that points at the right place, and a name that points at the right place is of little use if the browser shows a warning.
This guide explains both parts for a WooCommerce store, in the order you would do them. You will learn which records matter, how to choose where DNS is managed, how a certificate is obtained and renewed, how to force every page onto HTTPS, and how to check the places where shops most often break: the checkout, payment callbacks and order emails. If your site is a plain blog, the guide on DNS and HTTPS for WordPress covers the same foundations without the shop-specific parts.
Two jobs: DNS and HTTPS
DNS is a distributed directory, described in RFC 1034. When a customer types your shop name, their device asks a resolver, the resolver asks the authoritative servers for your domain, and the answer contains the address of your web server. Nothing about the shop itself is stored in DNS; it only says where to go.
HTTPS is HTTP carried inside an encrypted TLS connection. A good overview is in Cloudflare's explainer on HTTPS. For a shop it matters for three reasons: customers type personal details, login cookies must not be readable by others on the same network, and browsers label pages without it as not secure. The certificate that makes it possible is issued for specific names, and it is only valid for a limited period, so renewal is part of the job.
Treat the two as a pair. Change DNS first, wait until the name reaches your server, then get the certificate, then change the shop to use https everywhere.

The DNS records a WooCommerce store needs
Most stores need only a handful of records. Open the DNS panel of whoever manages your domain and look for these.
| Record | Name | Points to | Why you need it |
|---|---|---|---|
| A | @ (bare name) | IPv4 address of your hosting server | The main route to the shop |
| AAAA | @ | IPv6 address, if your host provides one | Optional; use only if the server really answers on it |
| CNAME | www | the bare name, for example example.com | Lets www reach the same shop |
| CAA | @ | the certificate authority you plan to use | Optional; restricts who may issue certificates |
| MX | @ | your mailbox provider's mail servers | Receives mail for addresses on your domain |
| TXT | @ and others | SPF, DKIM, DMARC and verification values | Proves your mail is legitimate |
A few rules save a lot of time:
- One answer per name. If both an old and a new A record exist for the bare name, visitors get a mix. Remove the old one.
- Do not put a CNAME on the bare name. A CNAME cannot sit beside the other records a root name needs, such as MX and SOA. Use an A record there, or a provider-specific alias feature if you have one.
- Never guess the IP. Copy the address from your hosting panel. Shared hosts sometimes change it when moving servers, so check the panel again if the shop suddenly breaks.
- Match the hostnames you will really use. If you plan a separate subdomain for something, such as a help centre, add that record on its own; it does not need to touch the shop.
Choosing where DNS is managed
You can run DNS at the registrar, at your hosting company, or at a dedicated DNS service. The domain itself can stay with any registrar; only the nameserver setting decides who answers.
Managing DNS at your host is convenient because the certificate tool can validate automatically. Managing DNS at a separate provider gives you one place for records even if you change hosts later, and it makes migrations easier because you simply edit the A record. Whichever you choose, avoid splitting: only one set of nameservers should be active at a time, and records you add at the wrong provider are ignored.
If you are planning to register or move a name, the domains page lists what is available and how to manage it.
Lower the TTL before changes
Every record has a TTL, the number of seconds that resolvers may reuse the answer. Before you move a live shop, drop the TTL to five or ten minutes a few hours earlier. After the switch, raise it again. That keeps the window in which some customers see the old server short.
Getting an HTTPS certificate
A certificate binds a public key to one or more names. A certificate authority signs it after checking that you control the domain. The automated way is the ACME protocol, defined in RFC 8555; the nonprofit authority Let's Encrypt explains the flow in How It Works. Many hosting panels run this for you with one click, and renew the certificate before it expires.
There are a few kinds of validation. Domain validation proves control of the name only and suits most shops. Organisation and extended validation add checks on the business, which some owners prefer for trust reasons, though browsers present all of them in a similar way today.
Before requesting a certificate, verify these:
- The name already resolves to your server. The check usually fetches a small file from your site or reads a DNS record.
- Both the bare name and the www name are included. A certificate that covers only one will warn on the other.
- No CAA record forbids your chosen authority. If you have CAA records, make sure they allow it.
- Port 443 is open on the server and not blocked by a firewall rule.
After issuance, install the certificate in the hosting panel, then load the shop with https and check that the browser shows a closed padlock. Look at the certificate details to confirm the names and the expiry date.
Forcing HTTPS across the shop
A working certificate does not make every visit secure. A customer who types the bare name, or follows an old link, may still arrive over http. You want every request to end up on https and on one preferred hostname.
Do it in three layers:
- WordPress addresses. In Settings, General, set both the WordPress Address and the Site Address to the https form. WooCommerce reads from these.
- A server-level redirect. Add a permanent redirect from http to https in the hosting panel or a rules file. Server redirects are faster than plugin redirects and apply before WordPress loads.
- One canonical hostname. Decide whether customers see example.com or www.example.com and redirect the other one to it. Combining the two redirects into one hop avoids a chain that slows pages.
Fix mixed content
Mixed content is when an https page loads a resource from an http address. Product images, theme fonts, tracking scripts and embedded maps are the usual culprits. Browsers may block active content such as scripts and show warnings for images. The cleanest cure is to update the stored links: run a careful search-and-replace tool that understands serialized data, change http://example.com to https://example.com, and then clear every cache. Then open the pages in a private window and check the browser console for any remaining warnings.
Be careful with HSTS
HSTS is a header that tells browsers to use only https for your domain for a period of time. It is valuable once the setup is proven, but a mistake becomes sticky. Start with a short duration, test, and only then lengthen it. Skip the preload option unless you are sure every subdomain will always support https.
Checkout, payments and email
The checkout is where a configuration slip costs money, so test it deliberately.
Checkout and cart pages. These pages must load fully over https. If a caching plugin serves them from a cache keyed to the old scheme, you may see odd behaviour such as an empty cart. Exclude the cart, checkout and account pages from page caching, as the plugin's own documentation usually advises.
Payment gateways. Many gateways store the shop's return address and a webhook address. After moving to a new name or to https, update both in the gateway's dashboard. A webhook still pointing to http can fail after a redirect, and the order stays pending although the payment went through. Place a test order using the gateway's test mode.
Order emails. Emails from the shop depend on DNS as well. Keep the MX records for your mailbox, and publish SPF, DKIM and DMARC so receiving servers trust your messages. If you are setting up a mailbox on your own name, see how business email can fit alongside the shop. Check that the From address used by WooCommerce belongs to your domain.
Third-party scripts. Analytics, chat widgets and advertising tags have their own settings for the site address. Update them so reports and consent tools match the new https hostname.

A plain example
A small shop called Bean and Brew has been running on a temporary host name. The owner wants shop.beanandbrew.example to become the real address.
First, the owner copies the server IP from the hosting panel and creates an A record for the shop name, then a CNAME for www pointing at it, with a ten-minute TTL. After the name resolves, the hosting panel's certificate tool issues a certificate that covers both names. The owner sets both WordPress addresses to https, adds a redirect from http, and runs a dry run of search-and-replace for the old address. Opening the checkout reveals one warning: a font loaded from an http link in the theme settings. Fixing that link clears it.
Next, the payment gateway's webhook address is updated, and a test order is placed; the order moves from pending to processing. The shop's mailbox keeps its original MX record, and a TXT record with the mail provider's sender policy is added. Finally the TTL goes back to a normal value, and the owner puts the certificate expiry date in a calendar in case automatic renewal ever fails.
Troubleshooting common problems
| Symptom | Likely cause | What to try |
|---|---|---|
| Browser says the name cannot be found | The record is missing or still cached | Check the A record, wait for the TTL, test from mobile data |
| Wrong site appears | The server is not set up for this name, or an old record remains | Add the domain in the hosting panel, delete conflicting records |
| Certificate name mismatch | The certificate lacks this exact name | Reissue to cover both bare and www names |
| Too many redirects | Conflicting redirects between plugin, server and a proxy | Keep one rule, set both WordPress addresses to https |
| Padlock with a warning | Mixed content | Replace http links, clear caches, check the console |
| Orders stuck pending | Webhook still on the old address | Update the gateway's callback URL, test again |
| Emails go to spam | Missing or wrong SPF, DKIM, DMARC | Publish the mailbox provider's records |
Limits and what to watch for
- DNS changes are not instant. Allow time, and test from a different network than the one you used before.
- Certificates expire. Even with automatic renewal, a changed DNS record, a firewall rule or an expired payment on the hosting account can stop it. Check the date regularly.
- A certificate does not make a shop trustworthy. It proves encryption and name control, not good practice. Keep WordPress, WooCommerce and plugins updated, and use strong admin passwords with two-step login.
- Wildcard or multi-name certificates are convenient but check what they cover; a certificate for example.com does not cover a different domain.
- Moving between platforms changes the picture. A hosted platform handles the certificate for you, as described in the guide to DNS and HTTPS for Shopify, and a website builder does it differently again, as shown in DNS and HTTPS for Wix.
- Keep a record of what you changed. A short note listing each DNS record and its purpose saves hours when someone else takes over.
Summary
For a WooCommerce shop, DNS tells browsers where the server is and HTTPS proves that the connection is private and the site genuine. Create clean A and CNAME records with no conflicts, keep mail records intact, obtain a certificate that covers every hostname you use, set both WordPress addresses to https, add one clear redirect, and remove mixed content. Then test the checkout, payment callbacks and order emails before you rely on the shop, and watch certificate renewal after that.
When you are ready to choose or manage the domain behind the shop, you can start from the domains page.
Frequently asked questions
Which DNS records does a WooCommerce store need?
At minimum an A record for the bare domain pointing at your server and a CNAME for www pointing at the bare domain. Add AAAA if your host supplies an IPv6 address, and keep MX and TXT records for email.
Does WooCommerce need its own HTTPS certificate?
The certificate belongs to your domain and server, not to WooCommerce itself. Any valid certificate that matches your shop name works, and the checkout should only ever run over HTTPS.
Why do I see a padlock warning on some shop pages?
Usually mixed content: the page loads over HTTPS but pulls an image, script or font from an http address. Update the stored links and the theme or plugin settings that use them.
What happens when the certificate expires?
Browsers show a full-page warning and many customers will leave. Use automatic renewal where your host supports it, and set a reminder to check the expiry date anyway.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Ready to register your domain?
Search a name, compare extensions and pay once for the years you choose.
.com registration from $18.81 for the first year
Search domainsKeep reading

Domain & DNS Guides
How to Set Up DNS and HTTPS for WordPress
A clear guide to the DNS records and HTTPS settings behind a WordPress site: A, AAAA, CNAME and CAA records, certificates, redirects, mixed content and checks after launch.
10 min read

Domain & DNS Guides
How to Set Up DNS and HTTPS for Shopify
What DNS records a Shopify store with your own domain needs, how its HTTPS certificate is issued, and how to fix the usual problems with redirects, CAA and email.
10 min read

Domain & DNS Guides
DNS and HTTPS Setup for Wix: What to Configure
Which DNS records does a Wix site need, and why does the padlock sometimes fail to appear? A practical guide to records, redirects and certificates.
10 min read