How to add HTTP response headers and DNS TXT records

HTTP response headers

NGINX

In your server { } block add:

add_header HEADER_NAME "HEADER_VALUE";

APACHE

Add the following to your httpd.conf in your VirtualHost or in an .htaccess file:

Header set HEADER_NAME "HEADER_VALUE"

IIS

You can use the HTTP Response Headers GUI in IIS Manager or add the following to your web.config:

<system.webServer>
  <httpProtocol>
    <customHeaders>
      <add name="HEADER_NAME" value="HEADER_VALUE" />
    </customHeaders>
  </httpProtocol>
</system.webServer>

DNS TXT Records

BIND Server

If your domain is hosted by Bind DNS server, you can add DMARC record by locating your domain's zone file and opening it with your preferred editor, then add the following content:

; DMARC
_dmarc.yourdomain.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.uriports.com; ruf=mailto:dmarc@example.uriports.com"

Other

Most DNS services have a DNS Web administration where you can set up DNS records. Use the following values:

HOST: "_dmarc"
TYPE: TXT
VALUE:"v=DMARC1; p=none; rua=mailto:dmarc@example.uriports.com; ruf=mailto:dmarc@example.uriports.com".