I have domain for ex. example.com. That domain blocked in malaysia. So i am planning to redirect example.com to example.my only for malaysian user. I know how to redirect domain using php, javascript etc, those are server and client level, but i dont know how to do it in domain level. My domain is registered on name.com, but it seems they dont have feature to redirect domain by country. is there any other way to do this?
You would need to use GeoIP to see if the incoming request is originating from Malaysia and then redirect accordingly.
You need to recommend all visitors to use public DNS instead of local ISP DNS which has blacklisted your site example.com.
You can block the country wise access by blocking the IP range of that company fro the control panel or from the server.
Related
I purchased a domain name (we'll call it "exampledomain.com"). There is no website tied to the domain and there are no plans to do so.
I want to redirect all URL variants of this domain to an existing website I also own: (we'll call it "destinationdomain.com")
If a user types any of the following, I want to redirect them to https://www.destinationdomain.com/
https://exampledomain.com/
https://www.exampledomain.com/
http://exampledomain.com/
http://www.exampledomain.com/
How would I set this up?
What I believe I need to do is:
Add exampledomain.com as a Subject Alternative Name (SAN) to an existing SANs supported SSL I own for an existing website.
Point IPs of exampledomain.com to the IP used by destinationdomain.com
Add code to destinationdomain.com so that when it receives requests from the above exampledomain.com variants, it performs a 301 redirect to https://www.destimationdomain.com
POSSIBLE ALTERNATIVE?
Set up domain forwarding from exampledomain.com to https://www.destinationdomain.com/
Add exampledomain to destinationdomain.com's Subject Alternative Names (SANs)?
Is this accurate, or can I achieve this without step 3?
Thank you in advance.
Point IPs of exampledomain.com to the IP used by destinationdomain.com
You need to point it somewhere. It doesn't have to be the same server as you are using for your other site. (e.g. I might do this all in AWS and use an S3 bucket to do the redirect).
Add code to destinationdomain.com so that when it receives requests from the above exampledomain.com variants, it performs a 301 redirect to https://www.destimationdomain.com
The server that you point the new domain to does need to issue a 301 redirect.
This doesn't need to be anything to do with the old domain though. Even if they are hosted on the same server, you can use Virtual Name Hosting to use separate server configurations.
Add exampledomain.com as a Subject Alternative Name (SAN) to an existing SANs supported SSL I own for an existing website.
You will need the domain in the certificate for whatever server is hosting it. If you're using the same server then setting it up as a SAN makes sense.
I am using CloudFlare to manage my websites DNS. I want to use Page Rules to setup redirects for a number of URLs to go to another website URL.
Currently my hosting account, I have set them all up as addon domains and then setup redirects in CPanel.
I am moving across my sites to my own cloud server without a CPanel - I am using VestaCP. I don't want to clutter up the website records by adding each and every site I want to redirect to the host (there is a dozen of them) - I want Cloudflare to manage it all.
Is it possible to do this? Like use Cloudflare page rules and remove the A record pointing to the host server IP?
In order for you to use Page Rule to redirect to another site, there are 2 conditions:
Valid A record or CNAME record
That record is orange-clouded
The A record can point to any public IP address, for example 8.8.8.8, it doesn't matter because the visitor will be redirected away anyway. However it can't be IP address that belongs to Cloudflare (e.g. 1.1.1.1).
Similarly to CNAME record, can be pointed to any domain/subdomain (e.g google.com).
Cloudflare has a KB article that explains how you can configure the Page Rule to do the 301 redirection.
I know that to make repository private, I need to change my plan to paid, but what if I want to change the default username.github.com to a custom domain?
No, it doesn't look like you would have to upgrade your GitHub account to use a domain name. From the docs at https://help.github.com/articles/quick-start-setting-up-a-custom-domain/ (the description doesn't mention anything about being a paid customer):
Pick a custom domain and register it with a DNS provider (if you
haven't already done so). A DNS provider is a company that allows
users to buy and register a unique domain name and connect that name
to an IP (Internet Protocol) address by pointing your domain name to
an IP address or a different domain name. A DNS provider may also be
called a domain registrar or DNS host.
Set up your custom domain with your DNS provider. Our guides outline
how to set up your pages custom domain with your DNS provider
depending on the type of custom domain you have.
However, these are the only domain types that are supported by GitHub (https://help.github.com/articles/about-supported-custom-domains/):
www subdomain (www.example.com)
one apex domain & one www subdomain (example.com & www.example.com)
apex domain (example.com)
custom subdomain (blog.example.com)
If you want your GitHub pages site to redirect to your domain (or someone else's) it doesn't look like there's anything stopping you from putting just a simple javascript redirect in your GitHub page to redirect to that page.
I have a doman, mydomain.com as well as mydomain.biz and would like the the latter to be a synonym for the former: whenever a user enters www.mydomain.biz they are taken to www.mydomain.com.
I have everything working for mydomain.com and thought, from my limited understanding that a CNAME record would accomplish what I'm trying to do, so I have
NS mydomain.biz. = (nameservers that work fine)
SOA mydomain.biz. = (values that work fine)
CNAME *.mydomain.biz. = mydomain.com.
and when I host mydomain.biz I get
www.mydomain.biz is an alias for mydomain.com.
followed by other information that exactly matches what I get with host mydomain.com. Yet, any attempt to navigate to www.mydomain.biz fails.
I'm also perplexed by what I see when I look at propagation of my NS records. Checking for mydomain.biz gives the nameservers specified above, but checking for for www.mydomain.biz gives the values specified (elsewhere) for mydomain.com
Am I not going about this the right way? How should I configure my DNS records to direct all traffic from one domain to another.
DNS cannot redirect a request. Lets take an example on what CNAME does to clarify:
CNAME: domainA ==> domainB
What that would do is send requests for domainA to the same IP as domainB. However the URL will remain domainA (so it's not a redirect, a redirect would actually change the URL).
If you are okay with having the site load under two different domains, then a CNAME record will do the job. However you need to make sure that your server is configured to handle requests from both domainA and domainB. The way you do that is very different depending on your server environment. For example if you are using apache, your virtualhosts determine what domains are handled (you could set it up so any domain is accepted). If you are on shared hosting however, you will likely be restricted to the domain you signed up with. Adding more depends on your web host so you'd have to take it up with them.
If on the other hand you want the visitor to be redirected to domainB, you'd have to point domainA to a server that would return an HTTP redirect. It could be the same server, you just need to configure it to return the HTTP redirect if the request is for domainA.
So I have a Tumblr, which means I can't use htaccess, and am hoping there's a way I can redirect page url (example.com/post/2234324/posttitle to example.com/page), purely from my registrar (Namecheap).
Is there host records I can change, or something else, to redirect urls on my domain?
If you have access to your DNS and can add A records, etc. then look at CNAME record. Here you can enter an alias domain. This is commonly used with Amazon S3 when you set cdn.myco.com and your amazon bucket is cdn.myco.com.amazons3.com or if you use Google Apps for Business to manage your email.
SEE: http://support.google.com/blogger/bin/answer.py?hl=en&answer=58317
good instructions for various hosts