How to change a sub-domain name and redirect using the old name - dns

Alright, here's the dilemma I have. First off, I am by far not a Windows Server person. Not a huge fan of it at all, but I have no choice but to use it where I am.
I have a domain example.ag.mydomain.com
I would like to change this to example1.ag.mydomain.com
However, I want to be able to set it so if someone goes to example.ag.mydomain.com/wordpress it will redirect them to example1.ag.mydomain.com/wordpress.
I do have access to the DNS but I really have no clue how to do this, would this be a wildcard DNS or would this need to be set up differently?
I appreciate your help!

Related

How do I redirect from the old domain to the new domain via an alias on the DNS of the old domain, using the .htaccess of the new one

Sorry if that question title doesn't make any sense but it pretty much captures where I'm at with my confusion here.
So I've worked on a site that we'll call new-site.com that is going to be taking over from an existing site that we'll call old-site.com
There's no cross-over between the sites necessarily, but the owners don't want the sites to both exist at the same time so they want old-site.com to redirect to new-site.com which seems fairly straightforward.
My thought process for doing this would be to add a simple redirect rule to the htaccess file of old-site.com that just forwards everything to new-site.com, job done.
What is actually going to happen is that the developer of old-site.com is saying that what we need to do is to hold all the redirects for old-site.com in the htaccess file in the public folder of new-site.com and that he will then 'alias' the old-site.com domain over to new-site.com via the old domain DNS.
This is super confusing to me and a little out of my comfort zone and I'm not sure how I'd go about writing my redirects. Should I include the full domain name for old-site.com in there every time because otherwise surely I'll end up in a redirect loop if I don't use the domain name and I want to go from old-site.com/about-us to new-site.com/about-us?
I hope that makes sense and that some more experienced hands know what I need to do and can help me understand a little better?
Thank you

Tumblr custom domain/CNAME

I have a blog on Tumblr (faithfullforever.tumblr.com) which uses the custom domain www.mariannefaithfull.fm. Yesterday I shortly deactivated the custom domain on Tumblr to export content.
When I tried reactivating the custom domain on Tumblr it did not work anymore and it looks like they changed the way you have to set up things on your domain provider, so I had to fiddle with things over there. I managed to change the IP so that it points to Tumblr.
When you open www.mariannefaithfull.fm you get to Tumblr, but not my blog. The Tumblr settings page is giving me the following message when I test the domain.
I just want to make sure that this isn't a problem with the way I have set up things on my provider, but simply the waiting period of up to 72 hours. Tumblr's FAQ is not a very great help to me nor did my research on Google bring me any further on understanding how to set up a CNAME.
This is what the panel for changing records looks like on my provider. What exactly do I have to change/fill in to so that Tumblr can read the CNAME?
Name, TTL, Type, Priority, Value
Check on http://www.whatsmydns.net/. Is IP still pointing to tumblr or your own.
I had exactly the same problem just a couple of days ago. Though it's back to normal now so I suggest waiting until tomorrow; it should resolve itself :)
Judging from the screenshot you provided of your DNS interface, I think you want the following:
Name TTL Type Priorität Wert
www 10800 CNAME domains.tumblr.com.
Your subdomain is www and you want it to point to domains.tumblr.com.
The trailing dot here is important, otherwise www would become a CNAME for domains.tumblr.com.mariannefaithfull.fm, which would not be helpful :o)

Get rid the slash in URL (ex. something.com/dogs)

I recently purchased the domain name simply.do. I want to use it as a URL shortening service, but I don't like have to do simply.do/something. Can I remove the slash or replace it with a difference symbol?
If this helps, I am using a server running Nginx and I will not switch to Apache.
Thanks!
I would also appreciate any feedback on the domain name. I was hoping to sell simply.do/insurance, simply.do/religion, etc. to various companies. Do you think there is a way I could sell these parts on an auction website? Thanks!
When you visit simply.do, that refers to simply.do/index.php (if you use php in background).
So, you can use it as query, for eg, simply.do?insurance will lead to some long url like ://a-long-domain-name/a-long-list-of-directories.
Use server script to get the value after ? mark so that if someone visite simply.do?insurance, it will be like simply.do/index.php?insurance. It works with all browsers.
You can obtain the value from the $_SERVER['REQUEST_URI'] OR $_GET[] array, check if the query string: 'insurance' is in your db or not. If yes, redirect the user to required site.
You need to know how the HTTP protocol works here, to better understand what you are doing. If you want to sell the URLs, you need a basic URI handler for /insurance, or /religion. You can also sell insurance.simply.do, If you want to, thru' DNSes and default VirtualHost handlers.
This answer is irrespective of the server used.
You cannot remove/replace the / right after simply.do since it delimits the host and the path in the URI.

Subdomain or a different domain ? What should I use

I have my personal website at www.yassershaikh.com, now I am planning to setup a website for interview related questions and answers,
Now for this I have two options
Using sub domain www.interview.yassershaikh.com
using a completely different domain www.abcdxyz.com
Now I wanted to which of the above two methods is better.
Will using sub domain hurt my SEO result ? and google ranking ?
Also I was looking for sub domain as my current site is hosted by a very good service provider and at very resonable rate, so in that way I wont have to shell out again for another domain.
Please guide me on this.
Thanks in advance
Using a subdomain should not affect your google ranking. A sub domain is cheaper, provided you have a way to host the DNS records without paying somebody else anything extra. Keep in mind that you can also use interview.yassershaikh.com -- you don't need the leading www. As a matter of fact, you don't even need a subdomain; all you need is another hostname. Right now you have an 'A' record, a hostname, at www.yassershaikh.com. You can create another 'A' record at interview.yassershaikh.com, and use that. Google doesn't care whether your host is named www.yassershaikh.com, interview.yassershaikh.com, or bluecheese.yassershaikh.com -- you can have a bunch of them, all directly under the yassershaikh.com domain.

CNAME to an A - pointer To webpage

Is it possible to use a CNAME pointer, that points to an A pointer that points to the webapplication?
I've tried this multiple times now, without any success, and i start to think that it is not possible?!
i got this
"Bad request, invalid hostname" think its an 400 error.
If it is not possible to do it this way, can someone please give me some ideas how to start?
My web application:
I got a couple of users registered at my web application.
Each users is supposed to get an sub domain, for example, user1.mydomain.com (A-pointer to web.mydomain.com, where all the aspx filer are)
by reading the domainname I get the userID.
If this is not possible i have to put a lot of files in each domain, which i dont want to do. what would you do?
wildcards is not possible.
Why a cname to a A? i have to take into account that each user maybe want to point their domain to his or her account at my place. so their pointer should be a CNAME...
Thanks!
The problem is that your virtual hosts are not configured to accept requests for the domain the the CNAME record is for.
You need to set the ServerAlias directive (assuming you are using Apache) so it contains all possible variants that you want to use to access your app.
A CNAME record is simply an alias of an A record, so it will always resolve to the IP that the A record points to. What you need to do is tell your web server how to handle those domains (it's based on the Host: header of the HTTP request).
You will find that you have same problem if you create A records for your other subdomains, instead of CNAMEs.
If you need to dynamically add/remove users, you would probably want to use mod_vhost_alias so you don't have to restart Apache every time you do it.
EDIT Sorry, just noticed the reference to aspx, which presumably means you using IIS, which means I can't tell you exactly how to configure it since I know next to nothing about IIS. Re-tag this question with IIS and someone will probably be able to help :-)
ANOTHER EDIT This page from M$ may help you with IIS virtual hosting, although I still don't know how to do it dynamically/programmatically.

Resources