Is it possible to forward my Domain name to a free hosted website? - hosting

I have purchased a Domain name from BigRock. Is it possible to redirect this domain to my free hosted website on pythonanywhere.com with a sub-domain? for ex: myxyz.pythonanywhere.com
I am using a free plan of pythonanywhere.com which gives us a sub-domain with "pythonanywhere" as a parent domain.
Suppose, the Domain I've purchased is "myabc.com". I want to redirect all the requests on this URL (myabc.com) to my free hosted website (i.e. myxyz.pythonanywhere.com)
Edit: I tried the Domain Forwarding feature of BigRock. I entered "http://myxyz.pythonanywhere.com" in the redirection URL. In a couple of hours when I went to myabc.com, It was showing "myxyz.pythonanywhere.com refused to connect". which might be indicating that redirection was successful but Pythonanywhere is somehow blocking the redirection.

I believe it is possible. BigRock should have a domain manager where you can add your pythonanywhere domain.

Related

HTTPS using google domains and third party hosting

I have purchased a domain name through google domains (e.g. example.com). Separately I have created a website at a third party (wix). I am now trying to connect my domain name to the wix hosted site.
Setting up regular http was trivial: I copied the 2 custom name servers from wix to the DNS name server entries in google domains and then example.com immediately began routing to the wix site.
What are the next steps to setup https so that my domain securely routes to wix?
The help page for google domains states that I can go to Certificate Authority to obtain an SSL certificate, but then where does the certificate information go? In google domains or in wix? If the cert info goes in wix, do I have to change any settings on the google domains side?
Note: I am tyring to avoid doing redirect because I want the website url to always show "example.com", I don't want the address changed by redirect to "example.wix.com" while the user is browsing.
Thank you in advance for your consideration and response.
Eventually https began to redirect properly to wix as well. I was not able to discover the root cause, perhaps it was just a timing issue with DNS.

How to associate Heroku app with a Google domain?

I purchased a domain with Google and I would like to associate it with a Heroku app. What is the step-by-step process to achieve that?
I recently connected my app to a custom domain. Although my domain is purchased from AWS route53. I think the approach generally is the same.
First of all, you can check out this page written by Heroku. https://devcenter.heroku.com/articles/custom-domains
I believe the tutorial given by Heroku works. However, I am tired of all those CLI that make things unvisable XD. Luckily, we can configure it from the Heroku website instead of the CLI.
Here is my approach:
First open your app in the Heroku web page, then click the "Settings" button
https://dashboard.heroku.com/apps/{your app name}
Scroll down until you see the "Domains" section, Then click "Add domain"
https://dashboard.heroku.com/apps/{your app name}/settings
Input the domain name you purchased from google (eg. www.example.com)
After adding your domain, Heroku will give you the DNS target.
From your google domain DNS management page, you should be able to add a new record for your hosted zone.
Finally, add a new record with simple routing policy, type CNAME, and value equals to the DNS target provided by Heroku.
It is really simple if you follow these steps correctly. Due to my reputation level, I cannot upload photos. Feel free to contact me if you want some image to guide you how to locate the buttons :)
It’s only 3 steps:
1. Heroku, in your app > Settings > Add your domain:
Add www.[foo.com] (Note: www is KEY!) to your app
Copy the [DNS Target] it gives you
2.Google Domains > DNS > Resource records > Custom Records > Manage Custom Records:
www, CNAME, [DNS Target]
Now you’re basically set up. If someone goes to https://www.[foo.com] in a few minutes, they’ll see your Heroku app hosted at [DNS Target]. But if they go to any other permutation (http, non-www) they’ll get a 404 error. To solve this, we’ll set up permanent redirects to the main version in the next step.
Google Domains > Website > Add a Forwarding Address:
From Field: [foo.com]
To Field: https://www.[foo.com]
Permanent Redirect (301)
Forward Path (so that [foo.com]/about forwards to https://www.[foo.com]/about)
SSL Enabled
Boom. Wait a couple of minutes for DNS to catch up, and you’re done.
heroku certs:auto:refresh
In Terminal refresh the SSL cert settings on Heroku, and check the Heroku Dashboard to confirm everything’s working.
Confirm all the below permutations forward to your site correctly:
https:
https://www.[foo.com]
https://[foo.com]
http:
http://www.[foo.com]
http://[foo.com]
paths:
https://www.[foo.com]/about
http://[foo.com]/about
PS: So does this work for the naked domain like [foo.com] instead of www.[foo.com]? No! Google Domains does not support ALIAS domains, and therefore in combination with Heroku does not support forwarding to the naked (aka. root aka. apex) domain. Sorry! This surprised me too :( Source 1: Heroku Docs | Source 2: StackOverflow. Your only alternative here is to transfer your domain (which costs money) to something like Cloudflare.
A working answer with these explanations is taken from https://nikodunk.com/heroku-ssl-google-domains-2019/
Just to add to Fergus's answer, if you are seeing the warning "cant add cname records as root domain" add www to the host name input.

Point URL to different IP, A record

Example
Let's say we have a domain www.example.com.
This domain points to Heroku and we have functional website.
example.herokuapp.com
www.example.com
When we load the website
www.example.com
our website works and succesfully loading App on Heroku. Let's say it is running a Django framework (Python Environment)
There is another website that has different IP and is built in Ruby Rails for example and is running on different host provider.
If we load the website www.example.com, we are on the homepage, we can easily browse different pages like about, photos, videos etc.
Is there a possibility if I type
www.example.com/store/
that it would load that ruby rails website?
Let's remove possibilty moving the app from different provider to heroku or any other provider that www.example.com is on (or precisly were example.com points to in DNS).
Is it possible to map it somehow or point it in DNS to make it work like that?
Short answer: no.
Longer answer, you could use a 301 redirect from /store/ to the other site, or a subdomain, like store.example.com. For more information, read up on DNS A records, as you suspected! Good luck!

Unable to redirect to a naked domain from Heroku using Hostgator

I'm trying to use my Hostgator domain with my Heroku app, everything works except the naked domain.
Redirect didn't work for me and they don't provide ALIAS or ANAME?
Any thoughts?
After spending hours with the customer service I found what I need.
Hostgator does not provide this feature to map to naked domains without A records.
Thankfully I was able to find http://wwwizer.com/naked-domain-redirect
It's a free service and does the trick...

What does 302 redirects as filters mean?

I have an hosting account on Godaddy which has been redirected for last few days, to be precise, 5 days.
After mailing them quite few times, this is what they had to say
The 302 redirects are filters setup to maintain the integrity of the hosting server while we investigate and resolve an issue(s)
The post is not for boo-haa of godaddy, all I want to know is the technical aspect of the above term.
Why these filters are set, how they are set and what purpose they fulfill
Any sort of detailing on the issue will be helpful. Being a developer, it will only help when I plan to roll out hosting on my own.
The filter was set by godaddy to restrict access to your account until they can complete an investigation. The why would depend but if your website had illegal content on it whether you put it there, a user of yours or your account was hacked and someone else did would be some possible whys. By illegal I mean anything in violation of their policies or the law. The purpose is to protect their network and or you in the event that someone else is responsible for whatever they are investigating. I would call them.
I am in the process of pulling my website from Godaddy because of the same reason. They will randomly run a 302 redirect filter to protect their server. I found about 1/3 of my potential customers were being redirected to a non working version of my website. I spoke with a support staff at Godaddy and they had no reason but it is designed to protect their system. This is what you should look for. I use a company called Stat Counter and it shows your visitors paths my web address is www.actions4photographers.com What Go daddy does is take my web address and add 4-or 5 letters to the end of it and redirecting my customers to a non working version of my site.
I have had customers tell me my site was not functioning and I spent a small fortune trying to find out why. Now I know. Trying to get GoDaddy to admit that they were running the 302 redirect filters was like pulling hens teeth. I have been spending... like most of you a lot of time and money working on getting traffic to find out they are just turning away 1/3 of my traffic. How it this fair?

Resources