0
I want to make example.com
and www.example.com
point to blog.example.com
. I cannot test this because DNS updates on live websites are so slow and I am not sure what record is not applying as it should.
My current setup is:
example.com
site has two subdomains:
www
and blog
.
example.com has the following records:
example.com SOA 'some default value from my provider'
(not quite sure what SOA record is)blog.example.com NS dns1.myprovider.com
blog.example.com NS dns2.myprovider.com
example.com NS dns1.myprovider.com
example.com NS dns2.myprovider.com
www.example.com NS dns1.myprovider.com
www.example.com NS dns2.myprovider.com
example.com TXT 'some default values from my provider'
(not quite sure what TXT record is)
'www' subdomain has the following records:
SOA
record(default value)NS
record(dns1) (not removable)NS
record(dns2) (not removable)
'blog' subodmain has following records:
SOA
record(default value)NS
record(dns1) (not removable)NS
record(dns2) (not removable)A
record(actual IP of server)
Beside this, I have defined two redirects:
example.com
to blog.example.com
www.example.com
to blog.example.com
Now when I go to blog.example.com
it works as it should. When I go to example.com
I am redirected to www.example.com
and www.example.com
returns "server DNS address could not be found."
What did I do wrong?
EDIT: Update after suggestions from Twisty. Current setup is: https://pasteboard.co/bRfMKJv09.png
And now I don't have redirection from www.example.com to blog.example.com
What kind of redirects are we talking about here? CNAME records or something else? – Spiff – 2017-05-24T23:47:37.803
By the way, hostnames like www.example.com and blog.example.com are usually handled with simple A records, not as full subdomains. Subdomains are for when you want to create another whole layer of names. – Spiff – 2017-05-24T23:51:10.837
I dont know what kind of redirects I defined. I just have "Manage redirects" on my provider's domain control panel. I can remove those redirects if I manage to setup redirecton with records. How can I handle that redirects with A record? Is'n't A record used for allocating IP of server? – maleta – 2017-05-25T07:33:38.613
You can also look at using Hurricane Electric - https://dns.he.net to manage your DNS; They provide a free DNS service which is usually vastly more configurable than most ISP's. SOA record is "Start Of Authority" - The SOA record stores information about the name of the server that supplied the data for the DNS zone A TXT record is often used for SPF mail records - Sender protection Framework
– Darío Martín – 2017-05-25T09:19:16.610But looking at your question, I'd say that the reason 'blog.example.com' works is that as @Spiff has mentioned, it has an A record, which tells the querying DNS server where to point. 'www.example.com' has no 'A' record so any querying DNS server will not know what IP address to return. – Darío Martín – 2017-05-25T09:26:53.523
@Dario Thank you for explanation. As for configuration: I am expecting that my DNS redirects www.example.com to blog.example.com before it looks for IP. – maleta – 2017-05-25T10:24:23.563