Heroku - custom domain DNS - ruby-on-rails

I am a complete newbie when it comes to redirecting etc.
I bought a domain (mydomain.co) and I have a heroku app (mydomain.herokuapp.com) (upgrading to paid in the upcoming month). What I want to do is to be able to access the heroku app after entering the domain url and stay o this domain, and not be redirected to mydomain.herokuapp.com.
My settings for the domain look like this (I translated it myself, so there may be some mistakes):
With this settings, I can access my app but it is displayed in a frame, what's more - some of the pages do not work.
What I want to do is to be able to type mydomain.co and display mydomain.herokuapp.com but as regular site, and not inside a frame. What options should I choose?
Another thing is - will I be able to use the domain (which I paid for) and do the redirect if I do not buy a hosting from the company?
PS I added custom domains to my herokuapp and read their [guide], but I still do not understand.3.
Here are also my domain records - I believe it has something to do with this, but it so hard to test it as those DNS changes take some time.

You should remove your redirection. You also need to put a CNAME on mydomain.co with value mydomain.herokuapp.com.

Related

Forward a domain but keep URL

I'd like to send http://app.client-domain.com/ to my Heroku-hosted Rails app at http://www.my-domain.com/.
From research it looks like this would be relatively straightforward (with domain record redirects/forwards like A, MX, CName, etc.)
However, I don't want http://app.client-domain.com/ to just forward the browser to http://www.my-domain.com... I want it to appear that the user is still on http://app.client-domain.com.
For example, a request to:
http://app.other-domain.com/user/4
would be serving data from:
http://www.my-domain.com/user/4
... but the URL would remain:
http://app.other-domain.com/user/4
Likewise, if a user is sent (via the app) to a new address within the app (like /products/4), the scheme above would be maintained. It would truly look like the app lived at
http://app.other-domain.com/
Is this possible?
It is possible. There are two main methods to achieve something like this.
The preferred method would be for the client to use a DNS CNAME that points app.client-domain.com to www.my-domain.com. Your heroku app, would then have to be configured with the domain app.client-domain.com. It should also be configured to not redirect to "primary" domain.
The more problematic way to solve this, is to set up a webserver for app.client-domain.com that serves a webpage with frames, where www.my-domain.com is then loaded in a frame.
The CNAME approach is by far the preferred way. Using frames gives issues with SSL, and some sites might try to escape being in frames, and will likely also cause PCI compliance issues if you are using payment gateways.

Can I hide the domain name in the URL (in my Rails application)?

I have a Ruby on Rails application where my customers should ask their customers to go. But I would like to be able to hide/mask my own domain name from the url, so the customers of my customers don't feel like they are on a 3rd party website.
For example, if my domain name is:
https://app.example.com/visit/:customer_id
then what is my options for masking the example.com part?
If it is not possible to mask the domain name (I can see that even by using the IP address directly, https errors appear), then is it possible to put in some prefixes like e.g.:
https://prefix.app.example.com/visit/:customer_id
https://app.prefix.example.com/visit/:customer_id
https://app.example.prefix.com/visit/:customer_id
Btw, it's not important to keep the https security on these pages particularly, but I don't suppose it is possible to have an application that has both encrypted and non-encrypted pages?
your customers will have to setup their DNS to point to your application. you can use a CNAME to accomplish that. this can be done by using a subdomain.
if you use SSL/HTTPS you have to make sure that the certificates match the domain.
like #lassej already pointed out, an iframe is probably a better way of integration. it has several limitations though.

tumblr on a rails subdirectory on heroku

If I use tumblr's subdomain feature with rack reverse proxy middle ware will I get the seo benefits of having a blog at site.com/blog over blog.site.com?
Are these articles the right guide for this?
http://www.tumblr.com/docs/en/custom_domains
http://bindle.me/blog/index.php/304/rack-middleware-for-seo-fun-and-profit
Also this site will be hosted at heroku using zerigo for dns is that where I would point the cname to blog.site.com from?
First, if you haven't already, enable Zerigo for Heroku (steps available in the custom domain heroku post you referenced):
http://www.tumblr.com/docs/en/custom_domains
You may have to wait a couple of days to get your dns propagated through zerigo if you haven't gone through the process already.
Second, go to your heroku dashboard,
dashboard.heroku.com/apps
select the app you want to modify, select zerigo and then select the configure button. This takes you to the zerigo site.
Third, add a CNAME record in Zerigo. Set "Host" to subdomainname.yourapp.com. Set "Data" to domains.tumblr.com and save.
Wait ten minutes for the change to take effect. Then go to subdomainname.yourapp.com - if it goes to a tumblr error page you are in business.
Login to your tumblr dashboard, choose settings, and check "custom domain name", pointing to subdomainname.yourapp.com. Select test app. Should be ready to go rather instantaneously.

using \\servername\sharename in IE9 not being picked up as intranet site

I have a very basic intranet site for our company, and it's main purpose is to link to SMB shares on our network, so people can open files and edit them, without the need to then reupload to the site.
What I have, is a basic < a href="\IP ADDRESS\SHARENAME\">< /a>
The issue seems to be, regardless of whether I use the IP address, or the actual DNS name of the machine, IE9 always seems to think the intranet is an internet site, and stops these links from working.
Let's say for example, the web server address is 10.1.3.81, and I have a share on that same server for a global phone directory spreadsheet. I want someone to be able to click on the link on the page, and have it open that file directly.
So for the href, I put in \\10.1.3.81\intranet\phone directory\list.xls
Or something like that. IE9 (which is what all our users are using), considers this link to point to file://10.1.3.81/intranet/phone directory/list.xls
That's great, but as it doesnt consider this to be on the intranet, it blocks the file:// protocol, and the link does nothing.
If I add the site to my trusted sites list, it then works correctly. So I am wondering if there is a way on the programming side of things, that will let me create these kind of links and have them auto picked up as an intranet link?
Failing that, I will post on serverfault, and see if someone can guide me on applying a policy to add this site to trusted sites for all users and computers.
Many thanks
Eds
As it turns out, I was accessing the intranet by using either the FQDN or the IP address of the server.
As this article shows, http://support.microsoft.com/kb/303650 , if I just use the server name instead, and drop the domain name from the end, the links behave as I would like.
Sorry for this useless question.
Thanks, Eds

SEO Destroyed By URL Forwarding - Can't figure out another way

We design and host websites for our clients/sales force. We have our own domain: http://www.firstheartland.com
Our agents fill out a series of forms on our website that are loaded into a database. The database then renders the website as a database driven website.
/repwebsites/repSite.cfm?link=&rep=rick.higgins
/repwebsites/repSite.cfm?link=&rep=troy.thompson
/repwebsites/repSite.cfm?link=&rep=david.kover
The database application reads which "rep" the site is for and the appropriate page to display from the query string. The page then outputs the content and the appropriate CSS to style the page and give it its own individual branding.
We have told the user to use Domain Name Forwarding to get the users to their spot on our server. However, everyone seems to be getting indexed under our domain instead of their own. We could in theory assign an new IP to them, the cost is not the issue.
The issue is how we would possibly accomplish this.
With all of that said, them being indexed under our domain would still be OK as long as they would actually show up high in the ranking for their search term.
For instance, an agent owns TroyLThompson.com. If I search Troy L Thompson, It does not show up in my search. Only, "troy thompson first heartland" works (they show up third)
Apart from scrapping the whole system, I don't know what to do. I'm very open to ideas.
I'm sure you can get this to work as most hosting companies will host hundreds of websites on a single server (i.e. multiple domains on one IP).
I think you need your clients to update the nameservers for their domains (i.e. DNS) to return the IP address of your hosting server. Then you need to configure your server to return the right website based on the domain that was originally requested.
That requires your "database driven website" to look in the HTTP request and check which domain was originally requested, then it can handle the request accordingly.
- If you are using Apache, see how to configure Apache to host multiple domains on one IP address.
- If you are using Microsoft IIS, maybe Host-Header Routing is what you need.
You will likely need code changes on your "database driven website" to cope with these changes.
I'm not sure that having a dedicated IP address per domain will help much, as then you have to find a way to host all those IP addresses from a single web server. However, if your web server architecture already supports a shared database and multiple servers, then that approach might work well for you, especially if you expect the load from some domains to be so heavy that you need a dedicated web server for them.
Google does not include URL in its index which return a 301 status code. The reason is pretty obvious on second thought, because the redirect tells Google "Whatever was here before has moved there, please update your references". One solution I can see is setting up Apache virtual hosts on your server for each external domain, and have each rep configure their domain's DNS A record to point to the IP address of your server.

Resources