How to Set Up Certificate Services (AD CS) Without Painting Yourself Into a Corner

How to deploy Active Directory Certificate Services properly — offline root, issuing CA, validity periods, CDP and AIA, and the decisions you cannot undo later.

How to Set Up Certificate Services (AD CS) Without Painting Yourself Into a Corner

Certificate Services is unusually unforgiving. Most Windows roles can be reconfigured, moved or rebuilt without much drama. A CA cannot. Its name, its key length and its validity period are fixed at installation and baked into every certificate it ever issues. Get one of them wrong and the fix is a new CA and a migration.

This covers the decisions that are permanent, a two-tier design that suits most organisations, and the configuration steps people discover they missed about eighteen months later.

Quick Facts

  • The CA common name cannot be changed after installation. Neither can the key length or the hash algorithm.
  • A two-tier design, offline root, online issuing CA. Is the standard and is not much harder than a single tier.
  • Never install a CA on a domain controller, and never on a machine you might rename or repurpose.
  • CDP and AIA paths must be reachable by every client, including from outside the network if certificates are used there.
  • The root CA certificate validity must be substantially longer than the issuing CA, which must in turn exceed the certificates it issues.

The decisions you cannot undo

DecisionFixed at install?Consequence of getting it wrong
CA common nameYesA rebuild and full certificate reissue
Key lengthYesWeak keys embedded in every issued certificate
Hash algorithmYesDeprecated signatures across the estate
Root validity periodYesA disruptive root rollover far sooner than you want
Server name and domainEffectively yesThe CA cannot be renamed or moved between domains easily
CDP and AIA pathsEditable, but not retroactivelyOld certificates keep pointing at the old paths forever

The last row is the one that surprises people. You can change the CDP and AIA locations at any time, but only certificates issued afterwards carry the new values. Everything already out there keeps the old path, so a URL you retire has to keep resolving until the last certificate using it expires.

Design first, two tiers

The standard design has an offline root CA, which is a standalone server, not domain joined, kept powered off in a safe and started only to sign the issuing CA certificate and publish a fresh CRL. Below it sits an enterprise issuing CA, domain joined and always online, which does all the day-to-day work.

The point of the offline root is that the key that underpins everything is not on a machine attached to the network. Compromise the issuing CA and you revoke it and stand up a new one. Compromise the root and every certificate in the organisation is worthless.

A single-tier enterprise root is simpler and is what many small environments end up with. It works, and it means the root private key lives on a domain-joined, always-on server. Which is a real and permanent weakness. The extra effort of two tiers is a couple of hours, once.

Sensible validity periods

TierValidityCRL publication
Offline root CA20 years6 to 12 months, published manually
Issuing CA10 years1 week, with a 2 to 3 day overlap
Issued certificates1 to 2 yearsStandard delta CRL schedule

The rule underneath the numbers: a CA can never issue a certificate valid beyond its own expiry. As the issuing CA approaches the end of its life it silently starts truncating the certificates it issues, which people notice as certificates that expire far sooner than requested.

The root CRL is the one that catches everybody. It is published manually, and if it expires while the root is switched off, validation of the issuing CA fails and certificates stop being trusted across the estate. Put the renewal date in a calendar with two reminders, because nothing else will tell you.

Installing the offline root

Build it as a standalone workgroup server, not domain joined. A small virtual machine is fine. It spends its life powered off.

Install-WindowsFeature AD-Certificate,ADCS-Cert-Authority -IncludeManagementTools

Install-AdcsCertificationAuthority -CAType StandaloneRootCA -CACommonName "CORP Root CA" -KeyLength 4096 -HashAlgorithmName SHA256 -ValidityPeriod Years -ValidityPeriodUnits 20 -CryptoProviderName "RSA#Microsoft Software Key Storage Provider"

# Point CDP and AIA at a web location the whole organisation can reach
certutil -setreg CA\CRLPeriodUnits 12
certutil -setreg CA\CRLPeriod "Months"
certutil -setreg CA\CRLOverlapPeriodUnits 2
certutil -setreg CA\CRLOverlapPeriod "Weeks"
certutil -setreg CA\ValidityPeriodUnits 10
certutil -setreg CA\ValidityPeriod "Years"
restart-service certsvc
certutil -crl

Do not skip the CDP and AIA configuration on the root. It is the step most often left at defaults, and the default points at the root server itself. A machine that is switched off and not on the network, which means validation quietly fails.

The issuing CA

Quick Steps

  1. Build a domain-joined member server. Not a domain controller. The two roles conflict awkwardly and you can never demote it cleanly.
  2. Install the role and choose Enterprise Subordinate CA.
  3. It produces a request file. Copy that to the root by USB, sign it, and bring the certificate back.
  4. Install the signed certificate on the issuing CA and start the service.
  5. Publish the root certificate and root CRL into Active Directory with certutil -dspublish.
  6. Configure the CDP and AIA extensions on the issuing CA to point at an HTTP location.
  7. Configure certificate templates and set autoenrolment through Group Policy.
# On the root, sign the request
certreq -submit "C:\issuing.req"
# Approve it in the Certification Authority console, then export the certificate

# On a domain controller, publish root trust
certutil -dspublish -f "CORPRootCA.crt" RootCA
certutil -dspublish -f "CORPRootCA.crl" "CORP Root CA"

# Verify the chain from any domain member
certutil -verify -urlfetch "C:\Temp\issued-cert.cer"

That last command is the single most useful diagnostic in the whole product. It walks the chain, fetches every CDP and AIA URL, and tells you exactly which one is unreachable or expired.

Templates and autoenrolment

Never edit the built-in templates. Duplicate the one you want, rename the copy, and edit that. The originals are used by parts of the operating system and modifying them causes faults that are extremely hard to attribute.

On the duplicate, set the validity period, the key length, whether the private key is exportable, usually no, and the security permissions. For autoenrolment, the group needs Read, Enrol and Autoenrol. Then enable the template on the CA, because a published template that has not been issued does nothing.

Finally, configure the Certificate Services Client autoenrolment policy in Group Policy, ticking both renewal and update options. Without that, machines will not collect certificates on their own no matter how the template is configured.

🛠️

Gear We Recommend

A PKI deserves properly backed-up storage for its keys and CRLs. Here is the storage kit we use.

Browse our Storage and Backup picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases

The mistakes worth avoiding

  • Installing the CA on a domain controller. It works and then you can never demote the DC cleanly. Always a member server.
  • Leaving CDP and AIA at defaults. Every certificate issued points at a location that may not be reachable.
  • Forgetting the root CRL renewal. The root is off, the CRL expires, and trust collapses estate-wide with no warning.
  • Using a CA name containing the server name. The CA name is permanent; the server name should not be.
  • Editing built-in templates rather than duplicating them.
  • No backup of the CA private key. Back up the CA database and key to offline media, and test the restore.

Glossary

TermWhat it means
AD CSActive Directory Certificate Services. The Windows PKI role.
Root CAThe top of the trust chain, ideally offline and rarely used.
Issuing CAThe subordinate CA that issues day-to-day certificates.
CDPCRL Distribution Point. Where clients fetch the revocation list.
AIAAuthority Information Access. Where clients fetch issuer certificates.
CRLCertificate Revocation List. The list of certificates no longer trusted.
AutoenrolmentAutomatic issue and renewal of certificates through Group Policy.
TemplateA definition controlling what a certificate contains and who may request it.

Frequently asked questions

Can I rename a certificate authority after installation?

No. The common name is embedded in the CA certificate and in every certificate it issues. Changing it requires standing up a new CA and reissuing everything, which is why the name deserves careful thought before you click install.

Do I really need an offline root CA?

If certificates matter to your security posture, yes. A single-tier enterprise root leaves the key underpinning all trust on an always-on domain-joined server. The extra work for two tiers is a couple of hours, once.

What happens when the root CRL expires?

Validation of the issuing CA certificate starts failing, and certificates across the estate stop being trusted. Because the root is normally powered off, nothing warns you. Diarise the renewal with reminders.

Can I install AD CS on a domain controller?

Technically yes, and you will regret it. The domain controller can then never be demoted cleanly, and the two roles have conflicting patching and restart profiles. Use a member server.

How long should certificates be valid?

One to two years for issued certificates is a reasonable balance, and public trust rules have been moving towards shorter lifetimes. Ten years for the issuing CA and twenty for the root gives comfortable headroom.

Disclosure: this post may contain affiliate links. If you buy through one of them, we may earn a small commission at no extra cost to you. We only recommend products we’ve tested or genuinely rate.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Intune, Active Directory, PowerShell and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published 770+ practical guides to real-world IT problems. He also builds free Windows utilities, including Ultimate Settings Panel, which has been downloaded over 850,000 times.

Leave a Reply

Your email address will not be published. Required fields are marked *