Hostname/IP does not match certificate's altnames

Topic summary

A developer is encountering a certificate validation error while attempting to connect to their Shopify store using the shopify-api-node library.

Error Details:

  • The error message indicates: “Hostname/IP does not match certificate’s altnames”
  • Specifically: Host shop.XX.com.myshopify.com is not in the cert’s altnames
  • DNS altnames listed: myshopify.com, *.myshopify.com

Configuration:

  • Using shopName: shop.XX.com
  • Configured with apiKey and password credentials
  • API version set to 2022-10

Issue:
The hostname format appears incorrect—the developer is using shop.XX.com as the shop name, which results in the library constructing an invalid URL (shop.XX.com.myshopify.com). The certificate only covers *.myshopify.com domains, causing the SSL/TLS validation to fail.

No responses or solutions have been posted yet.

Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

I am trying to use MONEI/Shopify-api-node: Node Shopify connector sponsored by MONEI (github.com) library, to get orders from my shopify store.
My code is as follows

const Shopify = require(“shopify-api-node”);
const shopify = new Shopify({
shopName: “shop.XX.com”,
apiKey: “XXXX”,
password: “XXXXX”,
apiVersion: “2022-10”,
});

const test = await shopify.order.list();
console.log(test);

But I am getting the following error
RequestError: Hostname/IP does not match certificate’s altnames: Host: shop.XX.com.myshopify.com. is not in the cert’s altnames: DNS:*.myshopify.com, DNS:myshopify.com

1 Like