{"id":740,"date":"2023-05-11T09:11:24","date_gmt":"2023-05-11T09:11:24","guid":{"rendered":"https:\/\/techstersweb.com\/blog\/?p=740"},"modified":"2023-05-11T09:12:47","modified_gmt":"2023-05-11T09:12:47","slug":"fixing-noaccess-control-allow-originheader-present","status":"publish","type":"post","link":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/","title":{"rendered":"Fixing &#8220;No&#8217; Access-Control-Allow-Origin&#8217; Header Present&#8221;"},"content":{"rendered":"\n<p><br>&#8216;<strong>Access-Control-Allow-Origin<\/strong>&#8216; is an HTTP header that is used in the context of Cross-Origin Resource Sharing (CORS) to control which origins are allowed to access a resource from a different origin.<\/p>\n\n\n\n<p>When a web browser makes a request for a resource (such as an API endpoint or a web page) from a different origin (domain, protocol, or port), the server hosting that resource includes the &#8216;Access-Control-Allow-Origin&#8217; header in the response. This header specifies the allowed origins that are permitted to access the resource.<\/p>\n\n\n\n<p>The value of the &#8216;Access-Control-Allow-Origin&#8217; header can be one of the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A specific origin: If the header value is set to a specific origin (e.g., &#8216;<a href=\"https:\/\/techstersweb.com\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/techstersweb.com<\/a>&#8216;), it means that only requests originating from that exact origin are allowed to access the resource. Other origins will be blocked by the browser&#8217;s security mechanisms.<\/li>\n\n\n\n<li>An asterisk (<em>): If the header value is set to &#8216;<\/em>&#8216;, it indicates that any origin is allowed to access the resource. This is known as a wildcard value and is less restrictive in terms of security. However, it should be used with caution, as it allows any website to access the resource, potentially exposing sensitive data or resources.<\/li>\n<\/ol>\n\n\n\n<p>The &#8216;Access-Control-Allow-Origin&#8217; header is part of the CORS mechanism, which is designed to protect users and ensure that resources are not accessed by unauthorized origins. It helps to prevent cross-site scripting (XSS) attacks and enforce the Same-Origin Policy, which is a security concept that restricts how a document or script loaded from one origin can interact with resources from a different origin.<\/p>\n\n\n\n<p>It&#8217;s important to note that the &#8216;Access-Control-Allow-Origin&#8217; header is sent by the server in the response, not set by the client making the request. The client&#8217;s browser interprets this header and determines whether the response can be accessed based on the specified origin(s).&#8217;<\/p>\n\n\n\n<p class=\"has-large-font-size\">How to resolve it Access-Control-Allow-Origin ?<\/p>\n\n\n\n<p>Simple, open .htaccess file and add following code<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><mark style=\"background-color:#ff6900\" class=\"has-inline-color has-white-color\">&lt;IfModule mod_headers.c>\n    Header set Access-Control-Allow-Origin \"*\"\n&lt;\/IfModule><\/mark>\n\nor\n\n<mark style=\"background-color:#ff6900\" class=\"has-inline-color has-white-color\">&lt;IfModule mod_headers.c>\n    Header set Access-Control-Allow-Origin \"www.example.com\"\n&lt;\/IfModule><\/mark>\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216;Access-Control-Allow-Origin&#8217; is an HTTP header that is used in the context of Cross-Origin Resource Sharing (CORS) to control which origins are allowed to access a resource from a different origin.<\/p>\n","protected":false},"author":1,"featured_media":741,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[76,77,72,42,74,73,46,78,5,38,30,31,75,40],"class_list":["post-740","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kc","tag-knowledge","tag-technicalquestion","tag-access-control-allow-origin","tag-ecommercedevelopment","tag-httpheader","tag-no-access-control-allow-origin","tag-shopifydevelopment","tag-technicalforum","tag-web-design","tag-webdesigningcompany","tag-webdevelopmentcompany","tag-websitedevelopmentcompany","tag-websiteerror","tag-wesitedesigningcompany"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fixing &quot;No&#039; Access-Control-Allow-Origin&#039; Header Present&quot; - Web Design Insights | Blog by Top Web Design Company in India<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fixing &quot;No&#039; Access-Control-Allow-Origin&#039; Header Present&quot; - Web Design Insights | Blog by Top Web Design Company in India\" \/>\n<meta property=\"og:description\" content=\"&#039;Access-Control-Allow-Origin&#039; is an HTTP header that is used in the context of Cross-Origin Resource Sharing (CORS) to control which origins are allowed to access a resource from a different origin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Design Insights | Blog by Top Web Design Company in India\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechstersWeb.IT\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-11T09:11:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-11T09:12:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techstersweb.com\/blog\/wp-content\/uploads\/2023\/05\/jenik9atwnnnw815b8au.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"blogsTechsters\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@techstersweb\" \/>\n<meta name=\"twitter:site\" content=\"@techstersweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"blogsTechsters\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/\"},\"author\":{\"name\":\"blogsTechsters\",\"@id\":\"https:\/\/techstersweb.com\/blog\/#\/schema\/person\/11bab9f9db9b4b5cccb2f0ebcde27029\"},\"headline\":\"Fixing &#8220;No&#8217; Access-Control-Allow-Origin&#8217; Header Present&#8221;\",\"datePublished\":\"2023-05-11T09:11:24+00:00\",\"dateModified\":\"2023-05-11T09:12:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/\"},\"wordCount\":321,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/techstersweb.com\/blog\/#organization\"},\"keywords\":[\"#knowledge\",\"#technicalquestion\",\"Access-Control-Allow-Origin\",\"ecommercedevelopment\",\"httpheader\",\"No Access-Control-Allow-Origin\",\"shopifydevelopment\",\"technicalforum\",\"Web Design\",\"webdesigningcompany\",\"Webdevelopmentcompany\",\"websitedevelopmentcompany\",\"websiteerror\",\"wesitedesigningcompany\"],\"articleSection\":[\"Knowledge Center\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/\",\"url\":\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/\",\"name\":\"Fixing \\\"No' Access-Control-Allow-Origin' Header Present\\\" - Web Design Insights | Blog by Top Web Design Company in India\",\"isPartOf\":{\"@id\":\"https:\/\/techstersweb.com\/blog\/#website\"},\"datePublished\":\"2023-05-11T09:11:24+00:00\",\"dateModified\":\"2023-05-11T09:12:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/techstersweb.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fixing &#8220;No&#8217; Access-Control-Allow-Origin&#8217; Header Present&#8221;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/techstersweb.com\/blog\/#website\",\"url\":\"https:\/\/techstersweb.com\/blog\/\",\"name\":\"Web Design Insights | Blog by Top Web Design Company in India\",\"description\":\"Where creativity meets technology \u2014 blogs by web design professionals\",\"publisher\":{\"@id\":\"https:\/\/techstersweb.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/techstersweb.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/techstersweb.com\/blog\/#organization\",\"name\":\"Techsters Web\",\"url\":\"https:\/\/techstersweb.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techstersweb.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/techstersweb.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"contentUrl\":\"http:\/\/techstersweb.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"width\":1800,\"height\":756,\"caption\":\"Techsters Web\"},\"image\":{\"@id\":\"https:\/\/techstersweb.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/TechstersWeb.IT\/\",\"https:\/\/twitter.com\/techstersweb\",\"https:\/\/in.linkedin.com\/company\/techsters-web\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/techstersweb.com\/blog\/#\/schema\/person\/11bab9f9db9b4b5cccb2f0ebcde27029\",\"name\":\"blogsTechsters\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techstersweb.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a039d81de07de3f9e0ebd34a674a5adcc0e2c6527924ae663f4dcec30a53280a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a039d81de07de3f9e0ebd34a674a5adcc0e2c6527924ae663f4dcec30a53280a?s=96&d=mm&r=g\",\"caption\":\"blogsTechsters\"},\"sameAs\":[\"http:\/\/techstersweb.com\/blogs\"],\"url\":\"https:\/\/techstersweb.com\/blog\/author\/blogstechsters\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fixing \"No' Access-Control-Allow-Origin' Header Present\" - Web Design Insights | Blog by Top Web Design Company in India","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/","og_locale":"en_US","og_type":"article","og_title":"Fixing \"No' Access-Control-Allow-Origin' Header Present\" - Web Design Insights | Blog by Top Web Design Company in India","og_description":"'Access-Control-Allow-Origin' is an HTTP header that is used in the context of Cross-Origin Resource Sharing (CORS) to control which origins are allowed to access a resource from a different origin.","og_url":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/","og_site_name":"Web Design Insights | Blog by Top Web Design Company in India","article_publisher":"https:\/\/www.facebook.com\/TechstersWeb.IT\/","article_published_time":"2023-05-11T09:11:24+00:00","article_modified_time":"2023-05-11T09:12:47+00:00","og_image":[{"width":1600,"height":900,"url":"https:\/\/techstersweb.com\/blog\/wp-content\/uploads\/2023\/05\/jenik9atwnnnw815b8au.webp","type":"image\/webp"}],"author":"blogsTechsters","twitter_card":"summary_large_image","twitter_creator":"@techstersweb","twitter_site":"@techstersweb","twitter_misc":{"Written by":"blogsTechsters","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#article","isPartOf":{"@id":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/"},"author":{"name":"blogsTechsters","@id":"https:\/\/techstersweb.com\/blog\/#\/schema\/person\/11bab9f9db9b4b5cccb2f0ebcde27029"},"headline":"Fixing &#8220;No&#8217; Access-Control-Allow-Origin&#8217; Header Present&#8221;","datePublished":"2023-05-11T09:11:24+00:00","dateModified":"2023-05-11T09:12:47+00:00","mainEntityOfPage":{"@id":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/"},"wordCount":321,"commentCount":0,"publisher":{"@id":"https:\/\/techstersweb.com\/blog\/#organization"},"keywords":["#knowledge","#technicalquestion","Access-Control-Allow-Origin","ecommercedevelopment","httpheader","No Access-Control-Allow-Origin","shopifydevelopment","technicalforum","Web Design","webdesigningcompany","Webdevelopmentcompany","websitedevelopmentcompany","websiteerror","wesitedesigningcompany"],"articleSection":["Knowledge Center"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/","url":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/","name":"Fixing \"No' Access-Control-Allow-Origin' Header Present\" - Web Design Insights | Blog by Top Web Design Company in India","isPartOf":{"@id":"https:\/\/techstersweb.com\/blog\/#website"},"datePublished":"2023-05-11T09:11:24+00:00","dateModified":"2023-05-11T09:12:47+00:00","breadcrumb":{"@id":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/techstersweb.com\/blog\/fixing-noaccess-control-allow-originheader-present\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techstersweb.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Fixing &#8220;No&#8217; Access-Control-Allow-Origin&#8217; Header Present&#8221;"}]},{"@type":"WebSite","@id":"https:\/\/techstersweb.com\/blog\/#website","url":"https:\/\/techstersweb.com\/blog\/","name":"Web Design Insights | Blog by Top Web Design Company in India","description":"Where creativity meets technology \u2014 blogs by web design professionals","publisher":{"@id":"https:\/\/techstersweb.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techstersweb.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techstersweb.com\/blog\/#organization","name":"Techsters Web","url":"https:\/\/techstersweb.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techstersweb.com\/blog\/#\/schema\/logo\/image\/","url":"http:\/\/techstersweb.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","contentUrl":"http:\/\/techstersweb.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","width":1800,"height":756,"caption":"Techsters Web"},"image":{"@id":"https:\/\/techstersweb.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechstersWeb.IT\/","https:\/\/twitter.com\/techstersweb","https:\/\/in.linkedin.com\/company\/techsters-web"]},{"@type":"Person","@id":"https:\/\/techstersweb.com\/blog\/#\/schema\/person\/11bab9f9db9b4b5cccb2f0ebcde27029","name":"blogsTechsters","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techstersweb.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a039d81de07de3f9e0ebd34a674a5adcc0e2c6527924ae663f4dcec30a53280a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a039d81de07de3f9e0ebd34a674a5adcc0e2c6527924ae663f4dcec30a53280a?s=96&d=mm&r=g","caption":"blogsTechsters"},"sameAs":["http:\/\/techstersweb.com\/blogs"],"url":"https:\/\/techstersweb.com\/blog\/author\/blogstechsters\/"}]}},"jetpack_featured_media_url":"https:\/\/techstersweb.com\/blog\/wp-content\/uploads\/2023\/05\/jenik9atwnnnw815b8au.webp","_links":{"self":[{"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/comments?post=740"}],"version-history":[{"count":2,"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/posts\/740\/revisions"}],"predecessor-version":[{"id":743,"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/posts\/740\/revisions\/743"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/media\/741"}],"wp:attachment":[{"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/media?parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/categories?post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techstersweb.com\/blog\/wp-json\/wp\/v2\/tags?post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}