{"id":908,"date":"2024-05-07T11:45:27","date_gmt":"2024-05-07T11:45:27","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/why-do-i-get-error-while-connecting-couldn-t-connect-to-host\/"},"modified":"2025-08-27T08:40:37","modified_gmt":"2025-08-27T08:40:37","password":"","slug":"why-do-i-get-error-while-connecting-couldn-t-connect-to-host","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/why-do-i-get-error-while-connecting-couldn-t-connect-to-host\/","title":{"rendered":"Error &#8220;Error while connecting: couldn\u2019t connect to host&#8221;"},"content":{"rendered":"\n<p>If you get this error when using <a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-image-optimiser\/\" rel=\"noopener\">ShortPixel Image Optimizer<\/a> on your website, the problem is most likely with your <a href=\"https:\/\/en.wikipedia.org\/wiki\/Domain_Name_System#DNS_resolvers\" target=\"_blank\" rel=\"noopener\">DNS resolver<\/a>.<\/p>\n\n\n\n<p>Usually the solution is to <strong>contact your hosting provider<\/strong> and tell them that http(s):\/\/api.shortpixel.com cannot resolve to its IP address.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you get this error when using ShortPixel Image Optimizer on your website, the problem is most likely with your DNS resolver. Usually the solution is to contact your hosting provider and tell them that http(s):\/\/api.shortpixel.com cannot resolve to its IP address.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[37],"glossaries":[],"doc_tag":[],"class_list":["post-908","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-05","word_count":46,"total_views":"651","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin_mdli53m5","author_url":"https:\/\/kb.shortpixel.com\/author\/admin_mdli53m5\/"},"doc_category_info":[{"term_name":"ShortPixel Image Optimizer","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-image-optimizer\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=908"}],"version-history":[{"count":1,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/908\/revisions"}],"predecessor-version":[{"id":1432,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/908\/revisions\/1432"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=908"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=908"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=908"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}