Answers.Body: <p>Live Preview across different root domains is currently not possible in Craft. See here for more info: <a href="https://craftcms.stackexchange.com/a/14966/57">https://craftcms.stackexchange.com/a/14966/57</a></p>
  
  <p>You can use it across different subdomains that share the same root domain, though: <a href="https://craftcms.com/support/cross-domain-live-preview" rel="nofollow noreferrer">https://craftcms.com/support/cross-domain-live-preview</a> </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-09T19:04:25.733Z
Answers.LastActivityDate: 2016-12-09T19:04:25.733Z
Answers.LastEditDate: 2017-04-13T12:51:00.160Z
Answers.UserDisplayName: Brad Bell
Body: <p>For production site, the backend url is like - 'www.abc-prod.com'
  While the actual live site url is - 'www.xyz.com'</p>
  
  <p>When opening live preview for an entry, page never loads. Instead '301 Moved Permanently' is the status of response.</p>
  
  <p><a href="https://i.sstatic.net/HsXb8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HsXb8.png" alt="Response Headers"></a></p>
  
  <p>I have enabled CORS by adding following headers in response-<br></p>
  
  <blockquote>
    <p>Access-Control-Allow-Origin: <a href="https://www.abc-prod.com" rel="nofollow noreferrer">https://www.abc-prod.com</a><br>
    Access-Control-Allow-Headers: origin, x-requested-with, content-type<br>
    Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS<br>
    Access-Control-Allow-Credentials: true<br></p>
  </blockquote>
  
  <p>Still getting blank page for live review. What exactly I am missing?</p>
  
Tags: <live-preview>
Title: Live preview not working for CORS
ThreadText: # Live preview not working for CORS
  
  (Asked by: username_0 on 2016-12-09)
  
  For production site, the backend url is like - 'www.abc-prod.com'
  While the actual live site url is - 'www.xyz.com'
  
  When opening live preview for an entry, page never loads. Instead '301 Moved Permanently' is the status of response.
  
  [![Response Headers](https://i.sstatic.net/HsXb8.png)](https://i.sstatic.net/HsXb8.png)
  
  I have enabled CORS by adding following headers in response-
  
  > Access-Control-Allow-Origin: <https://www.abc-prod.com>  
  > Access-Control-Allow-Headers: origin, x-requested-with, content-type  
  > Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS  
  > Access-Control-Allow-Credentials: true
  
  Still getting blank page for live review. What exactly I am missing?
  
  **Tags:** live-preview
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-09. Score: 3 | Accepted answer
  
  Live Preview across different root domains is currently not possible in Craft. See here for more info: <https://craftcms.stackexchange.com/a/14966/57>
  
  You can use it across different subdomains that share the same root domain, though: <https://craftcms.com/support/cross-domain-live-preview>
  
  
  ---
  
  