# CORS header Access-Control-Allow-Origin missing

**URL:** <https://talk.observablehq.com/t/cors-header-access-control-allow-origin-missing/198>\
**Category:** Uncategorized\
**Created:** [February 1, 2018, 11:10pm UTC](https://talk.observablehq.com/t/cors-header-access-control-allow-origin-missing/198 "2018-02-01T23:10:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![invokesus](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/invokesus/32/363_2.png) [@invokesus](https://talk.observablehq.com/u/invokesus)\
**Post date:** [February 1, 2018, 11:10pm UTC](https://talk.observablehq.com/t/cors-header-access-control-allow-origin-missing/198/1 "2018-02-01T23:10:40Z")

</div>

I am getting a CORS error when trying to load data from certain websites.  
Eg.  
states =(await fetch(“[https://rte.socialcops.org/assets/maps/indiaStates.json](https://rte.socialcops.org/assets/maps/indiaStates.json)”)).json()

This raises the error:  
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at [https://rte.socialcops.org/assets/maps/indiaStates.json](https://rte.socialcops.org/assets/maps/indiaStates.json). (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Why is this happening only with certain websites and not with the ones in the examples?

Also, if anyone could suggest a way to load data in from a local server that would be very helpful.

---

<div class="post-metadata">

**Author:** ![invokesus](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/invokesus/32/363_2.png) [@invokesus](https://talk.observablehq.com/u/invokesus)\
**Post date:** [February 1, 2018, 11:34pm UTC](https://talk.observablehq.com/t/cors-header-access-control-allow-origin-missing/198/2 "2018-02-01T23:34:05Z")

</div>

Just read [this](https://beta.observablehq.com/@mbostock/introduction-to-data). Sorry, for not reading the docs first.
