HTTP headers | Access-Control-Allow-Origin Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The Access-Control-Allow-Origin is a response header that is used to indicates whether the response can be shared with requesting code from the given origin. Syntax: Access-Control-Allow-Origin: * | <origin> | null Directives: Access-Control-Allow-Origin accepts there types of directives mentioned above and described below: *: This directive tells the browsers to allow requesting code from any origin to access the resource. Used as a wildcard. <origin>: This directive defines any single origin. null: This directive defines null that should not be used due to any origin can create a hostile document with a "null" Origin. The "null" value for the ACAO(Access-Control-Allow-Origin) header should therefore, be avoided." Example: This example tells the browser to allow code from any origin to access a resource. access-control-allow-origin: * A response that tells the browser to allow requesting code from the origin https://www.geeksforgeeks.org// to access a resource will include the following: access-control-allow-origin:https://www.geeksforgeeks.org// Here the value of the Origin request header is compared with the list of allowed origins, and if the response header origin value is present in that compared list. Then set the Access-Control-Allow-Origin value to the same value as the Origin value. To check this Access-Control-Allow-Origin in action go to Inspect Element -> Network check the response header for Access-Control-Allow-Origin like below, Access-Control-Allow-Origin is highlighted you can see. Supported browsers: The browsers compatible with HTTP headers Access-Control-Allow-Origin are listed below: Google Chrome 4.0 Internet Explorer 10.0 Firefox 3.5 Safari 4.0 Opera 12.0 Create Quiz Comment S skyridetim Follow 0 Improve S skyridetim Follow 0 Improve Article Tags : Computer Networks HTTP-headers Explore Computer Network BasicsBasics of Computer Networking4 min readTypes of Computer Networks6 min readIntroduction to Internet5 min readNetwork Devices4 min readWhat is OSI Model? - Layers of OSI Model11 min readTCP/IP Model6 min readOSI and TCP/IP Model4 min readPhysical LayerPhysical Layer in OSI Model3 min readTypes of Network Topology9 min readTransmission Modes3 min readTransmission Media in Computer Networks7 min readData Link LayerData Link Layer in OSI Model4 min readSwitching | Computer Networks3 min readVirtual LAN (VLAN)3 min readFraming in Data Link Layer3 min readError Control in Data Link Layer3 min readFlow Control4 min readPiggybacking in Computer Networks2 min readNetwork LayerNetwork Layer in OSI Model3 min readIntroduction of Classful IP Addressing7 min readClassless Addressing in IP Addressing7 min readWhat is an IP Address?11 min readIPv4 Datagram Header4 min readDifference Between IPv4 and IPv63 min readPublic and Private IP addresses4 min readIntroduction To Subnetting5 min readWhat is Routing?10 min readNetwork Layer Protocols9 min readTransport LayerTransport Layer in OSI Model4 min readTransport Layer Protocols9 min readTransmission Control Protocol - TCP4 min readUser Datagram Protocol - UDP3 min readSession Layer & Presentation LayerSession Layer in OSI model2 min readPresentation Layer in OSI model2 min readSecure Socket Layer (SSL)4 min readPoint-to-Point Tunneling Protocol - PPTP2 min readMultipurpose Internet Mail Extension (MIME) Protocol3 min readApplication LayerApplication Layer in OSI Model4 min readClient-Server Model3 min readWorld Wide Web (WWW)5 min readIntroduction to Electronic Mail4 min readWhat is a Content Distribution Network and how does it work?4 min readProtocols in Application Layer4 min readAdvanced TopicsWhat is Network Security?4 min readQuality of Service and Multimedia5 min readAuthentication in Computer Network3 min readEncryption, Its Algorithms And Its Future6 min readIntroduction of Firewall in Computer Network3 min readMAC Filtering in Computer Network3 min readWi-Fi Standards Explained2 min readWhat is Bluetooth?6 min readGenerations of wireless communication2 min readCloud Networking4 min readPracticeTop 50 Plus Networking Interview Questions and Answers15+ min readTop 50 TCP/IP Interview Questions and Answers 202515+ min readNetwork Fundamentals Interview Questions - Computer Networks15+ min readLast Minute Notes for Computer Networks14 min readComputer Network - Cheat Sheet15+ min read Like