I am trying to point custom domain name from Site5 to heroku domain. I am following this guide: https://devcenter.heroku.com/articles/custom-domains
Inside my Site5 control panel I choose Advanced DNS Zone Editor and inserted the following values:
Record type: CNAME
Record name: www
CNAME host: stark-plains-xxx.herokuapp.com
I saved those values but there is no change when I access my site www.mysite.com. There is still default index on front page.
Command host www.mysite.com only gives an IP address of my site.
Have I done everything correctly? Thank you.
I just want to answer my own question. That process I described is correct for www. It just needs a little bit more time to get it work.
So, for www.mysite.com these are correct values inside Site5 control panel -> Advanced DNS Zone Editor:
Record type: CNAME
Record name: www
CNAME host: stark-plains-xxx.herokuapp.com
For mysite.com, procedure is a little bit different because you can't delete default values. In this case simple redirect is needed. On Site5 dashboard we need to choose Domains -> URL Redirects and put the following values:
That's it. Now both www.mysite.com and mysite.com will redirect to our site hosted on Heroku.
Related
I am trying to use rails app as an extension of my Weebly app.
current domain is hosted by Weebly. I am trying to the following,
I am trying to use the one domain for two different applications(Weebly template website and Rails application)
I thought of two solutions and I don't know if any of them are applicable.
solution
add a subdomain eg. welcomerailsapp.example.com
or
www.example.com/welcomerailsapp
I will be pushing my Rails app to the Heroku server
little guidance would be appreciated
thank you
You can use a CNAME record to do what you want. This would be done at your domain registrar or DNS provider.
Example:
Domain: mydomain.com
CNAME www => yourweeblyhost.com (Weebly app server)
CNAME rails => yourrailsapp.com (Heroku server)
www.mydomain.com would then route to your Weebly app, rails.mydomain.com would route to your Rails app.
This can be done on Weebly via the settings tab under your domain. So all you'd need to do is pick a name for your subdomain, with that as the "name" for the CNAME record and point it to the URL Heroku gives you for your Rails app.
You can also get more complex with it by using wildcards.
So if you only wanted one subdomain (www), for example, to route to the Weebly app; you can configure it as such by creating a CNAME for the www subdomain and pointing it to Weebly as noted above. Then, by using a wildcard (usually * on most providers) as the "name" you can tell the internet that [anyotherthing].mydomain.com should route to the Rails app without having to define each subdomain manually.
I'm posting this because none of the other questions related to Namecheap/Heroku have helped me.
It doesn't seem to be possible to have a configuration where both of these are true:
https://example.com, https://www.example.com, http://example.com, http://www.example.com all end up loading the site
Emails get routed correctly to contact#example.com
The reason this doesn't seem to be possible is that in order for MX email records to work on Namecheap, there must not be a CNAME record for the naked domain. But for https://example.com to work, Heroku requires that I set up a CNAME for the naked domain (host # with value example.com.herokudns.com)
I tried using a URL Redirect record for the naked domain that goes to https://www.example.com but this does not cover the https://example.com case. But that's the closest I've come to having all cases working.
I ultimately don't care if a redirect happens to the www. version. I just need content to load for both naked and non-naked domains and for both https and non-https cases.
So aside from switching off of Namecheap, how can I get all the domains loading correctly and have email working as well?
So this configuration is now possible with namecheap/heroku.
Instead of choosing CNAME record type, pick ALIAS for the naked domain. Namecheap example of advanced DNS line would be like this:
(Type) (Host) (Value) (TTL)
ALIAS Record # heroku-weird-dns-target.herokudns.com 5 min
ALIAS will play along with both TXT and MX.
To have www working, just add the www.[yourdomain].com to heroku and set up a CNAME for the www on namecheap:
(Type) (Host) (Value) (TTL)
CNAME Record www heroku-dns-www-target.herokudns.com Auto
Now the http to https redirects should be handled by your application.
Also I would only use one of www or naked, and have the other rewrite url or redirect in the application.
I want to redirect myapp.herokuapp.com to mydomain.com.
What I was able to achieve with company that I bought a domain from (lets call them X) is to add new CNAME, so a www.mydomain.com displays myapp.herokuapp.com and that is OK.
What I also want to do is to be able to access the app without the need to write www before the rest of the address. It was said to me that I should change A record within domain configuration, but X company does not allow it. What I can (and what they recommended) is to set and option in domain configuration called IP/URL/host redirect to myapp.herokuapp.com.
Changing this makes my website available under the mydomain.com without the need to write www before, but what it also does is it displays the website in a frame.
What should I do to achieve this? Is this a heroku thing, the X company thing or should I change something in the way my website can be displayed?
Typing www.mydomain.com displays the website correctly - without the <frameset><frame></frame></frameset> tags.
In the Heroku Dashboard "Domains and Certificate" section, add to your custom domains both domain names, "www.mydomain.com" and "mydomain.com".
Make your DNS target the "mydomain.herokuapp.com" in both records.
Check https://devcenter.heroku.com/articles/custom-domains for more information.
I've got an app up and running on Heroku. I've purchased a top level .com domain from 1and1 (I have other sites there, so I thought that would make life easier).
When I attempted to redirect to my Heroku app, I was not allowed to modify the CName alias record like I have done for other sites - which were all subdomains. I was given two options: Frame redirect or HTTP redirect, I've tried both. The frame redirect doesn't seem to function at all - the page stays blank. The HTTP redirect does actually get to my heroku site, but when it displays the address bar shows myproject.herokuapp.com instead of mydomain.com.
I've added both the www.mydomain.com and mydomain.com to my heroku domains.
Is there anyway to add a mask or similar?
Short answer: you can not set CNAME for top of your domain.
Detailed answer: Why can't a CNAME record be used at the apex (aka root) of a domain?
Some DNS providers might offer workaround hacks.
I'm running WordPress MultiUser and a plugin to allow for domain mapping.
I have a subdomain site subdomain.domain.com
and I want domain2.com to point to it.
My tech buddy double checked my WP settings and said everything was good there.
When I go to my existing subdomain.domain.com site I am now redirected to domain.com registration page.
When I go to domain2.com I get the following:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
Prior to the domain mapping attempt the sub.domain.com site worked fine
with sub.domain.com defined in Plesk as an alias of domain.com
I have domain2.com refined in Plesk as an alias of domain.com
I was told to have domain2.com made into an alias of sub.domain.com
but I don't see how to do that in Plesk.
Cloudflare is redirecting the domain2.com to the server correctly.
What am I missing?
It is probably best to contact CloudFlare so we can actually look at the zone file & then check any redirect rules on your server.
Just a quick note that mapped domains need to be added as individual domains, if not a subdomain of root domain, so that's why it is important for us to look at the zone file. If you're simply adding subdomains to a domain already added, then that is a different issue (WPMU plugin is also available through outside developer that only works for subdomains).