Heroku's source URL works as a redirect instead of an alias

I added domains to my heroku project:

 $ heroku domains
=== diveintoworld Heroku Domain
diveintoworld.herokuapp.com
=== diveintoworld Custom Domains
Domain Name            DNS Target
─────────────────────  ───────────────────────────
diveintoworld.com      diveintoworld.herokuapp.com
www.diveintoworld.com  diveintoworld.herokuapp.com

$ host www.diveintoworld.com
www.diveintoworld.com is an alias for diveintoworld.herokuapp.com.

An entry was created CNAMEin the settings of my domain:

www.diveintoworld.com. CNAME diveintoworld.herokuapp.com.

And configure web page redirection from diveintoworld.comto www.diveintoworld.com.

Nothing seems to have been missed, but it all works as a redirect. www.diveintoworld.com->diveintoworld.herokuapp.com

But I need to make my site accessible under www.diveintoworld.com. (When a user sees my site, he should see this URL, not the hero’s URL in his address bar.)

+4
source share
1 answer

When i started

curl -s -I www.diveintoworld.com

It returns 301. This means that your application may perform an unexpected redirect.

HTTP/1.1 301 Moved Permanently
Server: Cowboy
Connection: keep-alive
X-Powered-By: Express
Location: https://diveintoworld.herokuapp.com/
Vary: Accept, Accept-Encoding
Content-Type: text/plain; charset=utf-8
Content-Length: 70
Date: Thu, 21 Apr 2016 05:34:24 GMT
Via: 1.1 vegur

X-Powered-By: Express express.js, , , . - URL- heroku? , , , ?

UPDATE - SOLVED

HEROKU_URL . Ghost, URL- .

HEROKU_URL http://www.diveintoworld.com, .

+6

All Articles