Answers.Body: <p>Ensure that your site is accessible via a single <em>canonical</em> hostname. Configure your webserver or CMS to redirect requests for other hostnames to the canonical hostname.</p>
  
  <p>Currently your site is permitting people to browse on both <em>www.example.org</em> and <em>example.org</em>. While this works fine for Drupal/Joomla/WordPress, CiviCRM doesn't handle it well, and you'll see form submission errors or CORS issues.</p>
  
  <p>By configuring a canonical hostname redirect, visitors hitting the wrong URL (eg <em>www.example.org/donate</em>) will be immediately redirected to the preferred hostname (eg <em>example.org/donate</em>).</p>
  
  <p>The following settings must match:</p>
  
  <ul>
  <li>canonical hostname in your webserver or CMS configuration (varies by software in use)</li>
  <li>Base URL in CMS config (Wordpress: <code>wp_options</code> table; Drupal: <code>$base_url</code> in settings.php; Joomla!: _______?)</li>
  <li><code>CIVICRM_UF_BASEURL</code> configured in <code>civicrm.settings.php</code></li>
  <li>Resource URLS in civicrm admin section</li>
  </ul>
  
  <p>Make sure to check both scheme (<code>http://</code> vs <code>https://</code>) and hostname (<code>example.org</code> vs <code>www.example.org</code> vs <code>www2.example.org</code>). Some modules or extensions (eg Drupal "secure pages") that offer redirects will also need to be considered/configured.</p>
  
  <p>Configuring canonical hostname redirect is recommended for SEO as well as because it makes civicrm behave much better :)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-05T03:21:18.450Z
Answers.Text: Thank you for the thorough answer. I found the two lines in .htaccess that needed to be uncommented.
Answers.UserDisplayName: GRoston
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-03T21:43:19.267Z
Answers.LastActivityDate: 2015-10-03T21:48:53.017Z
Answers.LastEditDate: 2015-10-03T21:48:53.017Z
Answers.UserDisplayName: Chris Burgess
Body: <p>All,</p>
  
  <p>This post <a href="https://forum.civicrm.org/index.php?topic=34829.0" rel="nofollow">https://forum.civicrm.org/index.php?topic=34829.0</a> describes the problem I just experienced. I was able to work around the issue by deleting www from the address in the address bar. Obviously, this is not a solution.</p>
  
  <p>What is the proper way to solve this problem?</p>
  
Tags: <civimember>
Title: Network Error due to Cross-Origin Request Blocked
ThreadText: # Network Error due to Cross-Origin Request Blocked
  
  (Asked by: username_0 on 2015-10-01)
  
  All,
  
  This post <https://forum.civicrm.org/index.php?topic=34829.0> describes the problem I just experienced. I was able to work around the issue by deleting www from the address in the address bar. Obviously, this is not a solution.
  
  What is the proper way to solve this problem?
  
  **Tags:** civimember
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-03. Score: 2 | Accepted answer
  
  Ensure that your site is accessible via a single *canonical* hostname. Configure your webserver or CMS to redirect requests for other hostnames to the canonical hostname.
  
  Currently your site is permitting people to browse on both *www.example.org* and *example.org*. While this works fine for Drupal/Joomla/WordPress, CiviCRM doesn't handle it well, and you'll see form submission errors or CORS issues.
  
  By configuring a canonical hostname redirect, visitors hitting the wrong URL (eg *www.example.org/donate*) will be immediately redirected to the preferred hostname (eg *example.org/donate*).
  
  The following settings must match:
  
  * canonical hostname in your webserver or CMS configuration (varies by software in use)
  * Base URL in CMS config (Wordpress: `wp_options` table; Drupal: `$base_url` in settings.php; Joomla!: \_\_\_\_\_\_\_?)
  * `CIVICRM_UF_BASEURL` configured in `civicrm.settings.php`
  * Resource URLS in civicrm admin section
  
  Make sure to check both scheme (`http://` vs `https://`) and hostname (`example.org` vs `www.example.org` vs `www2.example.org`). Some modules or extensions (eg Drupal "secure pages") that offer redirects will also need to be considered/configured.
  
  Configuring canonical hostname redirect is recommended for SEO as well as because it makes civicrm behave much better :)
  
  > **Comments:**
  > **username_0**: Thank you for the thorough answer. I found the two lines in .htaccess that needed to be uncommented.  
  
  ---
  
  