Skip to main content

Domcheck: Domain Ownership Validation

https://img.shields.io/pypi/v/domcheck.svg https://travis-ci.org/rs/domcheck.svg?branch=master

This Python library implements different strategies to validate the ownership of a domain name.

Available strategies

All strategies takes 3 arguments: the domain to check, a static DNS safe prefix like “yourservice-domain-verification” and a randomly generated code.

  • DNS TXT record: checks for the {prefix}-{code} string present in one of the TXT records on the domain name.

  • DNS CNAME record: checks for the existence of CNAME` record composed on the static ``{prefix}-{code} on the domain pointing to domain (usually yours) which the host is {prefix} (i.e.: {prefix}.yourdomain.com). NOTE: you may want to make sure that {prefix}.yourdomain.com resolves to something as some zone editors may check that.

  • Meta Tag: checks for the presence of a <meta name="{prefix}" content="{code}"> tag in the <head> part of the domain’s home page using either HTTP or HTTPs protocols.

  • HTML File: checks for the presence of a file named {code}.html at the root of the domain’s website containing the string {prefix}={code} using either HTTP or HTTPs protocols.

Usage Example

Simple usage will check the domain with all available strategies and return True if the validation passed:

import domcheck

domain = "example.com"
prefix = "myservice-domain-verification"
code = "myserviceK2d8a0xdhh"

if domcheck.check(domain, prefix, code):
    print "This domain is verified"

You may filter strategies by passing a coma separated list of strategies:

domcheck.check(domain, prefix, code, strategies="dns_txt,meta_tag")

Installation

To install domcheck, simply:

$ pip install domcheck

Licenses

All source code is licensed under the MIT License.

Metadata

Release files for domcheck 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for domcheck 1.1.4
File Size Uploaded Provenance Actions
domcheck-1.1.4.tar.gz 4.0 kB Without provenance Details for domcheck-1.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for domcheck 1.1.4
File Interpreter ABI Platform Actions
domcheck-1.1.4-py2.py3-none-any.whl Python 2, Python 3 none any Details for domcheck-1.1.4-py2.py3-none-any.whl

Total release size: 10.3 kB

Release files / domcheck-1.1.4.tar.gz

Download URL domcheck-1.1.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0c741b9e409d5165bcbd2eb5ec3cf8b2a0a44570a07c666b1ef8322cce3a1f13
BLAKE2b-256 checksum
How to use checksums
7b4a4ad714bf82d3edbee9f04a418461b76383da06cb33bbb118ab5c9fc62b4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / domcheck-1.1.4-py2.py3-none-any.whl

Download URL domcheck-1.1.4-py2.py3-none-any.whl
Size 6.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
75f8c6d5b99c608a32301d971f4410fcdee67a5b65fb771f88783a787f5c4b66
BLAKE2b-256 checksum
How to use checksums
e39e73fe6546b2b66909ef67e67ec0722497fe30b1d74fc842e04d90bbf744b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for domcheck 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page