<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2020-05-11</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001158324</issuerCik>
        <issuerName>COGENT COMMUNICATIONS HOLDINGS, INC.</issuerName>
        <issuerTradingSymbol>CCOI</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001811050</rptOwnerCik>
            <rptOwnerName>Wallace Sean Robert</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>2450 N ST NW</rptOwnerStreet1>
            <rptOwnerStreet2>4TH FLOOR</rptOwnerStreet2>
            <rptOwnerCity>WASHINGTON</rptOwnerCity>
            <rptOwnerState>DC</rptOwnerState>
            <rptOwnerZipCode>20037</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>VP, CFO &amp; Treasurer</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>common stock</value>
            </securityTitle>
            <transactionDate>
                <value>2020-05-11</value>
                <footnoteId id="F1"/>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>12000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>12000</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable></derivativeTable>

    <footnotes>
        <footnote id="F1">Subject to continued employment, the grant of restricted common stock for 12,000 shares will vest 25% on June 1, 2021, and the remainder will vest quarterly in increments of 750 shares over the next three years so that the grant is fully vested after four years of employment.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Sean Robert Wallace</signatureName>
        <signatureDate>2020-05-11</signatureDate>
    </ownerSignature>
</ownershipDocument>
