{"id":797,"date":"2026-11-16T15:00:05","date_gmt":"2026-11-16T15:00:05","guid":{"rendered":"https:\/\/html-editor-online.com\/blog?p=797"},"modified":"2026-11-16T15:00:05","modified_gmt":"2026-11-16T15:00:05","slug":"can-open-website-but-import-url-fails-cors-html-editor","status":"publish","type":"post","link":"https:\/\/html-editor-online.com\/blog\/can-open-website-but-import-url-fails-cors-html-editor\/","title":{"rendered":"Can Open Website but Import URL Fails? CORS and the HTML Editor Explained"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you can open website but import URL fails in the <a href=\"https:\/\/html-editor-online.com\/\" title=\"Advanced WYSIWYG HTML Editor - Create and Edit HTML Easily | HTML Editor Online\">WYSIWYG HTML editor<\/a>, the page itself is usually fine. Opening a page is a navigation that your browser performs for you. Importing it means the editor&#8217;s JavaScript must request the HTML and then read the response, and browsers only allow that across origins when the remote server grants permission through CORS (Cross-Origin Resource Sharing). Without that permission, the request can show up in the Network panel while its body stays unreadable to the editor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The input is a page address, the expected output is that page&#8217;s HTML inside the editor, and the practical workaround is to save the HTML to your device and use <strong>Import File<\/strong> instead. Below I show how to tell a CORS block from a Content Security Policy block or mixed content, and what a saved copy will and will not contain. The platform rules were checked against MDN documentation and the editor&#8217;s homepage on November 9, 2026.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li class=\"\"><a href=\"#why-you-can-open-a-website-but-import-url-fails-1\">Why You Can Open a Website but Import URL Fails<\/a><\/li><li class=\"\"><a href=\"#when-you-can-open-a-website-but-import-url-fails-read-the-console-2\">When You Can Open a Website but Import URL Fails: Read the Console<\/a><\/li><li class=\"\"><a href=\"#why-no-cors-and-browser-workarounds-do-not-help-3\">Why no-cors and Browser Workarounds Do Not Help<\/a><\/li><li class=\"\"><a href=\"#save-the-html-then-use-import-file-4\">Save the HTML, Then Use Import File<\/a><\/li><li class=\"\"><a href=\"#what-a-saved-copy-does-not-contain-5\">What a Saved Copy Does Not Contain<\/a><\/li><li class=\"\"><a href=\"#who-can-fix-each-kind-of-block-6\">Who Can Fix Each Kind of Block<\/a><\/li><li class=\"\"><a href=\"#frequently-asked-questions\">Frequently asked questions<\/a><\/li><li class=\"\"><a href=\"#next-steps\">Next steps<\/a><\/li><li class=\"\"><a href=\"#sources\">Sources and further reading<\/a><\/li><\/ul><\/nav><\/div>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-1-755-1-872f9569e8a965ba-1024x576.jpg\" alt=\"Illustration of a visitor entering a building freely while a messenger is stopped at a window, representing navigation versus cross-origin reading\" class=\"wp-image-800\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-1-755-1-872f9569e8a965ba-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-1-755-1-872f9569e8a965ba-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-1-755-1-872f9569e8a965ba-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-1-755-1-872f9569e8a965ba.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"why-you-can-open-a-website-but-import-url-fails-1\">Why You Can Open a Website but Import URL Fails<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Typing an address into the tab bar is a top-level navigation. The browser downloads the document and renders it, and no page script ever receives the raw bytes. A script is different. Code running on the editor&#8217;s page that asks for a document on another site makes a cross-origin request, and the same-origin policy decides whether that code may read what comes back.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An origin is the combination of scheme, hostname and port. <code>https:\/\/example.com<\/code> and <code>https:\/\/www.example.com<\/code> are different origins, and so are the <code>http<\/code> and <code>https<\/code> versions of one host. Any site other than the editor&#8217;s own address is cross-origin from the editor&#8217;s point of view. MDN describes this in its <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/Defenses\/Same-origin_policy\" title=\"Same-origin policy - Security | MDN\" target=\"_blank\" rel=\"noopener\">same-origin policy<\/a> reference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CORS is the mechanism the remote server uses to opt in. It answers with headers such as <code>Access-Control-Allow-Origin<\/code> that name the origin allowed to read the response. If that header is missing or names a different origin, the browser withholds the response from the script. CORS is not a ban on visiting a page, and the remote server may well have sent the full document. The browser simply refuses to hand it to the code that asked. The <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Guides\/CORS\" title=\"Cross-Origin Resource Sharing (CORS) - HTTP | MDN\" target=\"_blank\" rel=\"noopener\">MDN CORS guide<\/a> covers the full model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The editor&#8217;s URL import fetches from the browser, so these rules apply to it like any other web page. I cannot change another site&#8217;s response headers from inside an editor, and a page cannot override the browser&#8217;s decision either.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One detail trips people up. Even a plain cross-origin GET needs permission before its response can be read. A preflight request (an automatic <code>OPTIONS<\/code> check) is only sent for requests that need one, such as those with certain custom headers or methods. Seeing no preflight in the Network panel does not mean the import was allowed.<\/p>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6afb995e6ada8&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6afb995e6ada8\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-2-755-2-f010208f0867ea6b-1024x576.jpg\" alt=\"Illustration of a developer inspecting network requests with a magnifying glass to diagnose a failed URL import\" class=\"wp-image-802\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-2-755-2-f010208f0867ea6b-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-2-755-2-f010208f0867ea6b-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-2-755-2-f010208f0867ea6b-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-2-755-2-f010208f0867ea6b.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"when-you-can-open-a-website-but-import-url-fails-read-the-console-2\">When You Can Open a Website but Import URL Fails: Read the Console<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Guessing wastes time because several different blocks produce a failed import. Reproduce the failure with developer tools open and let the browser state the reason.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your browser&#8217;s developer tools (<kbd>F12<\/kbd> in most desktop browsers) and select the Console and Network tabs.<\/li>\n\n\n\n<li>In the editor, choose <strong>Import URL<\/strong> and enter the address you can open normally.<\/li>\n\n\n\n<li>Read the Console message first. It usually names the exact policy that blocked the request.<\/li>\n\n\n\n<li>In Network, select the request and note its status, any redirects and the response headers, especially <code>Access-Control-Allow-Origin<\/code>.<\/li>\n\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Then match what you see to the table.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>What you see<\/th><th>Likely cause<\/th><th>Who can change it<\/th><\/tr><\/thead><tbody><tr><td>No <code>Access-Control-Allow-Origin<\/code> header, or an origin that does not match the editor<\/td><td>The remote server&#8217;s CORS policy<\/td><td>The owner of the remote site<\/td><\/tr><tr><td>A message naming Content Security Policy or <code>connect-src<\/code><\/td><td>A restriction on connections the editor page may start<\/td><td>The owner of the page that sends the policy<\/td><\/tr><tr><td>Blocked as mixed content when importing an <code>http:\/\/<\/code> address<\/td><td>A secure page requesting an insecure resource<\/td><td>You, if the site also offers an <code>https:\/\/<\/code> address<\/td><\/tr><tr><td>Reason: CORS request did not succeed<\/td><td>A network, TLS, DNS or extension problem, not necessarily a missing header<\/td><td>You, by checking connectivity, the certificate and any blocker<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A few cautions help you read these results. A <code>200<\/code> status in Network shows that the server responded, not that JavaScript was allowed to read the body. When a Content Security Policy has no <code>connect-src<\/code> directive, <code>default-src<\/code> can apply instead, as MDN explains in its <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Headers\/Content-Security-Policy\/connect-src\" title=\"Content-Security-Policy: connect-src directive - HTTP | MDN\" target=\"_blank\" rel=\"noopener\">connect-src reference<\/a>. I am not claiming that the editor sets any particular policy, so let the Console text decide which row applies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MDN also documents the specific wording of each failure on its <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Guides\/CORS\/Errors\" title=\"CORS errors - HTTP | MDN\" target=\"_blank\" rel=\"noopener\">CORS errors<\/a> page, and the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Guides\/CORS\/Errors\/CORSDidNotSucceed\" title=\"Reason: CORS request did not succeed - HTTP | MDN\" target=\"_blank\" rel=\"noopener\">CORS request did not succeed<\/a> entry is worth reading if the message mentions that phrase. For the mixed-content row, see MDN&#8217;s <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/Defenses\/Mixed_content\" title=\"Mixed content - Security | MDN\" target=\"_blank\" rel=\"noopener\">mixed content<\/a> article.<\/p>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-3-755-3-ef30aea9335b2664-1024x576.jpg\" alt=\"Illustration of a sealed envelope behind frosted glass representing an opaque no-cors response\" class=\"wp-image-804\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-3-755-3-ef30aea9335b2664-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-3-755-3-ef30aea9335b2664-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-3-755-3-ef30aea9335b2664-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/11\/can-open-website-but-import-url-fails-cors-html-editor-image-3-755-3-ef30aea9335b2664.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"why-no-cors-and-browser-workarounds-do-not-help-3\">Why no-cors and Browser Workarounds Do Not Help<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When a request fails, <code>mode: \"no-cors\"<\/code> looks like an escape hatch. It is not one for importing. The request is sent, but the response is opaque: its body is hidden from your code. This fragment is for illustration only and should be run against a page you control.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">const response = await fetch(&quot;https:\/\/example.com\/page.html&quot;, { mode: &quot;no-cors&quot; });\nconsole.log(response.type); \/\/ &quot;opaque&quot;\nconst html = await response.text();\nconsole.log(html.length); \/\/ 0<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The server may have sent the page, but your script receives an empty string. That is why no-cors cannot bring a remote page&#8217;s HTML into an editor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I would also avoid launching a browser with its security checks disabled or installing an extension that rewrites headers just to get one import through. Those approaches weaken protection for every site you visit and are hard to keep scoped to one task. The save-then-import route below solves the same problem without touching browser security.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you do control the remote server, the fix belongs there. The response needs to permit the editor&#8217;s origin, for example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Access-Control-Allow-Origin: https:\/\/html-editor-online.com<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Requests that send credentials such as cookies need additional compatible settings, and they cannot rely on the <code>*<\/code> wildcard value. If you do not control the server, no browser-side setting will make an unreadable response readable, so do not expect one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"save-the-html-then-use-import-file-4\">Save the HTML, Then Use Import File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you are allowed to use the page&#8217;s content, the dependable workaround is to take the network request out of the picture.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the page normally in your browser and confirm that you have the right to reuse its content.<\/li>\n\n\n\n<li>Save the HTML to your device. Use your browser&#8217;s save-page command, or open the page source and copy it into a <code>.html<\/code> file. Menu names vary by browser.<\/li>\n\n\n\n<li>In the editor, choose <strong>Import File<\/strong> and select the saved file.<\/li>\n\n\n\n<li>Check the result: headings, lists, links and images, comparing against the original page.<\/li>\n\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This works because a file you pick yourself is read through the browser&#8217;s File API, as described in MDN&#8217;s <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/File_API\/Using_files_from_web_applications\" title=\"Using files from web applications - Web APIs | MDN\" target=\"_blank\" rel=\"noopener\">guide to using files from web applications<\/a>. That is a different operation from fetching a document from another website, so the remote server&#8217;s CORS policy never comes into play. It is a way to work with a saved copy. It does not change what the remote server allows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you later export your edited result, remember that the <a href=\"https:\/\/html-editor-online.com\/blog\/wysiwyg-html-download-missing-doctype-head-body\/\" title=\"WYSIWYG HTML Download Missing Doctype, Head and Body: Why It Happens\">downloaded HTML lacks the doctype, head and body<\/a> wrapper that a complete page needs, so plan for that if the result is destined for a full document.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-a-saved-copy-does-not-contain-5\">What a Saved Copy Does Not Contain<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A saved file is a snapshot of source markup, not the live site. Expect these gaps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Styling and scripts that live in external files may not come with an HTML-only save.<\/li>\n\n\n\n<li>Images and fonts remain references to their original locations.<\/li>\n\n\n\n<li>Content behind a login is only present if your session produced it when you saved.<\/li>\n\n\n\n<li>Content generated by JavaScript after load may be missing, because saving the source does not necessarily capture the current rendered DOM.<\/li>\n\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The homepage editor is a rich-text editor built for content such as headings, lists, links, images and code blocks. It does not build full-page layouts or tables, and unsupported markup is removed on import. If you also edit in source view, note that <a href=\"https:\/\/html-editor-online.com\/blog\/wysiwyg-source-view-removes-class-and-id-attributes\/\" title=\"WYSIWYG Source View Removes Class and ID Attributes: Why and What to Do\">source view removes class and ID attributes<\/a> that the editor does not support. For editing full-page markup with a sandboxed live preview, the <a href=\"https:\/\/html-editor-online.com\/editors\/html\" title=\"HTML Code Editor\">HTML Code Editor<\/a> is the better fit, though it has no validator. If the saved file is minified and hard to read, the <a href=\"https:\/\/html-editor-online.com\/tools\/html_beautifier\" title=\"HTML Beautifier\">HTML Beautifier<\/a> improves layout, but it does not repair invalid markup or restore removed comments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Treat imported markup from any outside source as untrusted until you have read it. Do not run scripts you did not write, and review links and embedded media before reuse. The homepage also lists auto-save to the browser, so avoid importing confidential material on a shared device.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"who-can-fix-each-kind-of-block-6\">Who Can Fix Each Kind of Block<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The cause tells you whose settings matter. A missing CORS permission belongs to the remote site, so a site owner can allow a specific origin on the responses that need it, while a visitor cannot. A Content Security Policy that restricts connections belongs to whoever serves the page that sent it. Mixed content is usually solved by using the secure address of the same resource. A network or extension failure is local to you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have confirmed the Console shows something that looks like a bug in the editor itself, you can report it on the <a href=\"https:\/\/html-editor-online.com\/contact\" title=\"Contact\">Contact page<\/a> with the exact message text, but do not paste private addresses or credentials. In every other case the save-then-import route remains the practical option.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"frequently-asked-questions\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-1\">Does CORS stop me from visiting a website?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. CORS only controls whether a script on one origin can read a response from another origin. Opening a page in a tab is a navigation and is not affected.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-2\">Does a failed import mean the URL is wrong or the site is down?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not necessarily. If the page opens normally in a tab, the address is probably fine. The Console message tells you whether the cause was a missing CORS permission, a Content Security Policy, mixed content or a network problem.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-3\">Can mode no-cors fix a blocked import?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. A no-cors request returns an opaque response whose body your code cannot read, so you would get an empty result rather than the page&#8217;s HTML.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-4\">Why does Import File work when Import URL does not?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A file you select yourself is read through the browser&#8217;s File API. That does not make a cross-origin request, so the remote server&#8217;s CORS policy is not involved.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-5\">Does every cross-origin request send a preflight?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. A preflight OPTIONS request is sent only for requests that require one. A simple GET may skip it but still needs permission to have its response read.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-6\">Who can change a CORS or Content Security Policy block?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The CORS response headers are set by the remote server, so only its owner can change them. A Content Security Policy is set by the page that sends it. As a visitor, you can use the saved-file workaround.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-7\">Is it safe to import any page I save?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Only import content you are allowed to reuse, and treat it as untrusted until you have reviewed it. Check links, embedded media and any markup before publishing, and never run scripts you did not write.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"next-steps\">Next steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you can open website but import URL fails, the page is not broken and you are not banned. The browser is declining to let the editor&#8217;s code read a cross-origin response, or a policy or mixed-content rule is stopping the request first. Open developer tools, read the Console message, match it to the right row, and if you are allowed to use the content, save the HTML and choose Import File. Then check headings, links and images against the original before you build on the imported copy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Related tools and resources on HTML Editor Online:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/html-editor-online.com\/\">WYSIWYG HTML Editor<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/blog\/wysiwyg-html-download-missing-doctype-head-body\/\">WYSIWYG HTML Download Missing Doctype, Head and Body: Why It Happens<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/blog\/wysiwyg-source-view-removes-class-and-id-attributes\/\">WYSIWYG Source View Removes Class and ID Attributes: Why and What to Do<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/editors\/html\">HTML Code Editor<\/a><\/li>\n\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sources\">Sources and further reading<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Guides\/CORS\" target=\"_blank\" rel=\"noopener\">Cross-Origin Resource Sharing (CORS) &#8211; HTTP | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Headers\/Content-Security-Policy\/connect-src\" target=\"_blank\" rel=\"noopener\">Content-Security-Policy: connect-src directive &#8211; HTTP | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Guides\/CORS\/Errors\" target=\"_blank\" rel=\"noopener\">CORS errors &#8211; HTTP | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Guides\/CORS\/Errors\/CORSDidNotSucceed\" target=\"_blank\" rel=\"noopener\">Reason: CORS request did not succeed &#8211; HTTP | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/Defenses\/Same-origin_policy\" target=\"_blank\" rel=\"noopener\">Same-origin policy &#8211; Security | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/Defenses\/Mixed_content\" target=\"_blank\" rel=\"noopener\">Mixed content &#8211; Security | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/File_API\/Using_files_from_web_applications\" target=\"_blank\" rel=\"noopener\">Using files from web applications &#8211; Web APIs | MDN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/\">Advanced WYSIWYG HTML Editor &#8211; Create and Edit HTML Easily | HTML Editor Online<\/a><\/li>\n\n\n<\/ul>\n\n\n","protected":false},"excerpt":{"rendered":"<p>When you can open a website but import URL fails, CORS is often why. Learn to diagnose it and use Import File as a workaround.<\/p>\n","protected":false},"author":1,"featured_media":799,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[247,244,241,246,243,245,242,138],"class_list":["post-797","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wysiwyg","tag-browser-security","tag-content-security-policy","tag-cors","tag-html-import","tag-import-file","tag-mixed-content","tag-url-import","tag-wysiwyg-editor"],"_links":{"self":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/comments?post=797"}],"version-history":[{"count":4,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/797\/revisions"}],"predecessor-version":[{"id":805,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/797\/revisions\/805"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/media\/799"}],"wp:attachment":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/media?parent=797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/categories?post=797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/tags?post=797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}