anchor.diff:                  GRDomain = get_canonical_hostname(),
                   RedPoint = binary_to_list(proplists:get_value(redirectionPoint, DataProplist)),
                   % Check if provider is in the same domain - then return NS
  -                % It not, return A records of GR servers and then make a HTTP
  +                % It not, return A or NS records of GR servers and then make a HTTP
                   % redirect.
                   case string:rstr(RedPoint, GRDomain) of
                       0 ->
  -                        #dns_zone{ip_addresses = IPAddresses, ttl_a = TTL} = DNSZone,
  -                        IPAddrList = proplists:get_value(GRDomain, IPAddresses),
  -                        FinalIPAddrList = account_lb(IPAddrList, LBAdvice),
  -                        ?dump({ok,
  -                                [dns_server:answer_record(Domain, TTL, ?S_A, IPAddress) || IPAddress <- FinalIPAddrList] ++
  -                                [dns_server:authoritative_answer_flag(true)]
  -                        }),
  -                        {ok,
  -                                [dns_server:answer_record(Domain, TTL, ?S_A, IPAddress) || IPAddress <- FinalIPAddrList] ++
  -                                [dns_server:authoritative_answer_flag(true)]
  -                        };
  +                        % Depending if asking about A or NS, return OZ nameservers or workers
  +                        case QueryType of
  +                            ?S_NS ->
  +                                return_oz_nameservers(DomainNotNormalized, DNSZone, LBAdvice);
  +                            ?S_A ->
  +                                #dns_zone{ip_addresses = IPAddresses, ttl_a = TTL} = DNSZone,
  +                                IPAddrList = proplists:get_value(GRDomain, IPAddresses),
  +                                FinalIPAddrList = account_lb(IPAddrList, LBAdvice),
  +                                {ok,
  +                                        [dns_server:answer_record(DomainNotNormalized, TTL, ?S_A, IPAddress) || IPAddress <- FinalIPAddrList] ++
  +                                        [dns_server:authoritative_answer_flag(true)]
  +                                }
  +                        end;
                       _ ->
                           #dns_zone{ttl_oneprovider_ns = TTL} = DNSZone,
  -                        {ok, {_Scheme, _UserInfo, HostStr, _Port, _Path, _Query}} = http_uri:parse(str_utils:to_list(RedPoint)),
  +                        #hackney_url{host = Host} = hackney_url:parse_url(RedPoint),
  +                        HostStr = str_utils:to_list(Host),
                           {ok,
  -                            [dns_server:answer_record(Domain, TTL, ?S_NS, HostStr)]
  +                            [dns_server:answer_record(DomainNotNormalized, TTL, ?S_NS, HostStr)]
                           }
                   end;
               _ ->
  -                answer_with_soa(Domain, DNSZone)
  +                answer_with_soa(DomainNotNormalized, DNSZone)
           end
       catch _:_ ->
  -        answer_with_soa(Domain, DNSZone)
  +        answer_with_soa(DomainNotNormalized, DNSZone)
       end.
   
   
   %%--------------------------------------------------------------------
   %% @private
  -%% @doc Returns records that will be evaluated as uthoritative SOA record
  +%% @doc Returns records that will be evaluated as authoritative SOA record
   %% in authority section of DNS response.
   %% @end
   %%--------------------------------------------------------------------
  
positive.code:                             [dns_server:authoritative_answer_flag(true)]
                      };
                  _ ->
                      handle_unknown_subdomain(DomainNotNormalized, Prefix, DNSZone, LBAdvice)
              end
      end.
  
  
negative.code: %%%-------------------------------------------------------------------
  -module(dns_query_handler).
  
  -include_lib("kernel/src/inet_dns.hrl").
  -include_lib("ctool/include/logging.hrl").
  -include("datastore/oz_datastore_models_def.hrl").
  -include("registered_names.hrl").
  -include_lib("hackney/include/hackney_lib.hrl").
  
  %% DNS config handling
  -export([load_config/0, load_config/1, get_canonical_hostname/0]).
  