# Understanding 301 responses

301 means "Permanent Redirect" (opens new window).

Domains often return it to redirect from HTTP to HTTPS, or from APEX to non-APEX versions.

Check it with the curl command at different versions of the domain:

 
 




 
 



$ curl -I https://example.com
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/
Content-Length: 0
Connection: close

$ curl -I https://www.example.com/
HTTP/1.1 200 OK
Content-Type: text/html; charset=iso-8859-1
...

The answer with 301 should contain a Location response header indicating what is the correct version of the domain.

# 301 on Origin

To work with MarfeelCDN, origin domains should point directly at the tenant's origin server, and not redirect to a different domain.

Expected output:

$ curl -I origin.example.com
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
...

Marfeel works better if only one version, APEX or non-APEX, is enabled.

MarfeelCDN must be configured with the right version of the domain: if the domain goes from APEX to non-APEX (or the opposite), the CDN configuration must also change. For APEX and non-APEX specific configuration, read the DNS configuration article.