Skip to main content

Configure DNS with domain registrar

You can verify every OA document's provenance and track it back to the creator or issuer. Achieve this by embedding an identityProof property in the document, which serves as a claim for identity. During the verification phase, the claim is checked against external records.

In this guide, you will bind the document issuer's identity to a valid domain name. This domain will display as the issuer every time an OA-compliant decentralized renderer is rendering the document.

Prerequisites

To complete this tutorial, meet the following prerequisites:

  • Know what your domain name is. To learn more about the domain name, see this article.

  • Have the edit access to your domain's DNS records.

  • Have your document store deployed.

    • If you are using the Ethereum method, see this guide.

    • If you are using the DID method, see this guide.

To bind the domain name to the issuer's identity, you must be able to change the DNS record of the domain name.

Inserting the DNS record for Ethereum smart contracts

You will need to add a DNS TXT record to your domain name. Confirm the exact steps to achieve this with your domain registrar. Usually, you can perform it through your domain registrar or DNS provider's web UI.

While this guide provides the steps on adding DNS TXT records for common domain registrars and DNS providers, the steps below show a generic procedure for any DNS provider:

  1. Select a domain name that you want to associate with your documents.

    The domain can be either the root domain (e.g. openattestation.com) or a subdomain (e.g. issuer.openattestation.com). One benefit of using the root domain is that it will be easier for the viewers to recognize your documents visually. However, you can choose to use the subdomain if there is a need to distinguish between multiple categories of documents to be issued (e.g. certA.openattestation.com and certB.openattestation.com).

  2. Within your domain registrar or DNS provider's web UI, insert a TXT record into the DNS in the following format:

    TypeNameValue
    TXTexample.com"openatts net=ethereum netId=<NETWORK_ID> addr=<DOCUMENT_STORE_ADDRESS>"

    The <DOCUMENT_STORE_ADDRESS> in the Value field above is the document store smart contract address.

  3. Prepend the document store address with addr.

    The quotes around the value are necessary. They will delimit each different records that you will bind to the same domain.

    An example of a valid DNS TXT record is in the following:

    TypeNameValue
    TXTdemo.openattestation.com"openatts net=ethereum netId=11155111 addr=0xED2E50434Ac3623bAD763a35213DAD79b43208E4"

    The netId corresponds to the network ID for the different Ethereum networks.

    Generally, you will use only the following networks:

    Network IDNameNetworkType
    1Ethereum MainnetmainnetProduction
    11155111Ethereum Testnet SepoliasepoliaTest
    137Polygon MainnetpolygonProduction
    80002Polygon Testnet AmoyamoyTest
    50XDC NetworkxdcProduction
    51XDC Apothem NetworkxdcapothemTest

    For more information on switching to production mode, refer to this section.

Testing the DNS record

Google DNS to Test

Note: The DNS propagation often takes a few minutes, though in some cases you may need to wait up to 24 hours. Continue with the other parts of the guide while waiting.

After adding the TXT record, it is recommended to check the record has been inserted correctly by viewing Google DNS. Be sure to select TXT in the "RR Type" dropdown list.

Additional note for the identity proof in production

The TXT record above is for the use of documents issued on the Ethereum Sepolia network. To bind the identity in production where your documents are issued in the Ethereum Mainnet network, you will have to change netId to 1.

An example of a valid TXT record for Ethereum Mainnet network is in the following:

TypeNameValue
TXTdemo.openattestation.com"openatts net=ethereum netId=1 addr=0x9db35C07350e9a16C828dAda37fd9c2923c75812"

Inserting the DNS record for DID

This is very similar to the Ethereum smart contracts. Only the shape of the data will change. Within your domain registrar or DNS provider's web UI, insert a TXT record into the DNS in the following format:

TypeNameValue
TXTexample.com"openatts a=dns-did; p=<DID>; v=1.0;"

The <DID> variable in the Value field above is DID public key id, as resolved by your DID.

For instance, check this DID. The expected value is did:ethr:0xaCc51f664D647C9928196c4e33D46fd98FDaA91D#controller, similar to didDocument.publicKey[0].id.

Additional note for adding DNS TXT records

You can choose any domain registrar and DNS provider based on your requirements.

For easy reference, find the below list of guides for several domain registrars and DNS providers: