We help IT Professionals succeed at work.

DNS error with redirected url

TechInTheWoods
on
137 Views
Last Modified: 2018-12-14
We configured a Url redirect to an external blog provider in our external DNS service-like go daddy.

Example
Our domain: company.com
Redirected name: newlink.company.com
Target address: blogprovider.com/newlink

The new name will resolve off our network (like from a cell phone) but not on network.

Internally we use Microsoft DNS configured with our ISP name servers as forwarders for name resolution.

Do we need to add any entries to our Microsoft DNS to get it to resolve correctly on network or just wait for the DNS changes to propagate through the internet and get to our forwarders?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2014
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
If you require better answers, post your real domain name.

What you're asking relate to both DNS + HTTP.

Here's how to accomplish what you're asking.

1) DNS: company.com will have an A record

2) DNS: newlink.company.com will have an A record, to allow HTTPS (as CNAME records are now disallowed)

3) HTTP: newlink.company.com  -> 302 redirect -> blogprovider.com/newlink

There is no such thing as a DNS URL redirect, this occurs at the HTTP level.

Note: Be very careful with this. If you make the common mistake of using a 301, then a year later change...

blogprovider.com/newlink -> blogprovider.com/version2

Then all visitors who visit your site after change will redirect to blogprovider.com/version2

And all visitors returning to your site (previous visits) will see blogprovider.com/newlink forever, because all major browsers have no expiration for 301 links.

This can cause many impossible to debug problems.

In most cases 302 redirects are best, as when you change the target link all old + new visits see the target link change.

Author

Commented:
Yes, thanks. I was indicating we setup the URL Redirect in our DNS. They have a nice explanation of how it is not a native DNS record type and what it actually does. This is a relatively temporary configuration, so I'm not too worried about long-term implications. Can you clarify what needs to be done on our internal DNS? If I point to Google's DNS servers from my machine, I can get to the new address. If I point to my internal DNS servers, I get "This site can't be reached".

 DNSOptions.png
URL Redirect record
URL Redirect is not a native DNS record type. Specifying URL Redirect for a hostname creates an underlying A record that directs the name to our URL Forwarding servers. These servers then perform an HTTP 301 redirect to the URL you specify in the address field. You can specify only the domain name to go to, or a full path to a specific file.

Example URL Redirect record formats:

www    URL Redirect    http://www.someotherdomainname.com/

blog    URL Redirect    http://weblogs.asp.net/pwilson/

Note that after redirecting, the target URL will show in the browser’s URL text box.

If a user specifies a path or filename after the domain name when requesting a host that is URL Redirected, that path information is intelligently appended to the destination URL. In the example above, if a user had entered “www.myname.com/someotherpage.html” in a browser, this would redirect to “http://www.someotherdomainname.com/someotherpage.html”.

Advanced users: The default HTTP code returned for the redirect is 302 ("HTTP 302 Found"). To change the code to 301 ("HTTP 301 Moved Permanently"), add the parameter "redir_mode=301" to your redirect address. To change the example above to use a 301 code instead of the default, you would use: http://www.someotherdomainname.com/?redir_mode=301. If the destination URL already has querystring parameters, use the ampersand ("&") instead of question mark ("?").
DNSOptions.png

Author

Commented:
@footech...
Yes, we have a zone for "company.com" in our internal DNS. Yours was the answer I was expecting to see when I posted this based on the research that I've done, but I was actually hoping against hope that I was misinterpreting those Google results.
Qlemo"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015

Commented:
All of above is true. The only way I see you can manage that without running an own web server just for redirecting is if you create another public DNS URL redirect entry outside of your local domain, and create a CNAME entry for that in your local DNS server.

Author

Commented:
Qlemo,

Can you elaborate on that answer? I don't quite understand what you mean by *another public DNS URL redirect entry outside of your local domain*. Do you mean a url redirect that doesn't include company.com in it or...?
Qlemo"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015

Commented:
Exactly. You would need something like redirect.otherDNS.com as public DNS URL redirect entry. You would then set up an internal CNAME "newlink" with value "redirect.otherDNS.com".

Author

Commented:
Thanks to all for your feedback. Though the answers are not necessarily the ones I wanted, they were helpful and made sense. :)
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Oh no. Not Registrar level redirects.

Never use Registrar level redirects, as they break in various ways. If you do (shudder) be sure you can set the redirect type to 302. If you can't change the 30X type, then use...

A standard .htaccess file with a redirect.

If you use CNAMEs, then you'll get caught up in the SSL changes over the past 24 months, where some browsers, in some cases report CNAME'ed HTTPS + all HTTP links as suspicious pages.

Guideline: Don't muck with trying to get around HTTPS. SSL certs have been free for years, so wrap every domain + host in an SSL cert (correctly) + all will work well.
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Rereading your comments...

You can't run your own DNS servers (you serve the zone files) + use Registrar level redirects.

For Registrar level redirects to work, your Registrar must manage all your zone file records.

Be sure you're clear about how this works, else you'll end up wasting a lot of time + wonder why nothing's working as you expect.
CERTIFIED EXPERT
Top Expert 2014

Commented:
There may be one other possibility.  In your "company.com" zone, create a delegation for "newlink.company.com" that points to the SOA for your public domain.

To find the SOA, run the command:
nslookup -q=soa company.com 8.8.8.8
Use what is listed after "primary name server =".

Now when a client inside your network queries for newlink.company.com, the response will be what the public DNS has.