Yes, a smart contract can have a primary name, but the ENS App and ENS Explorer cannot set one. For how a primary name works, see What is a primary name? For a contract, it is set by calling ENS contracts directly.
Good to know
The name must point back at the contract. An ETH primary name needs the name's ETH address record to hold the contract's address. A Default primary name needs the name's Default address to hold it.
If the address does not match, apps show the contract's address instead of the name.
Each call is a transaction, so the caller needs a little ETH for network fees (gas).
For a regular wallet, see Set your primary name.
Who can set a primary name for a contract
Some contracts cannot call the ENS registrars directly. For these, ENS has two adapter contracts: ReverseRegistrarAdapter and DefaultReverseRegistrarAdapter. An adapter accepts the call only when it comes from:
the contract itself
the contract's owner address, if the contract uses
Ownablean address the contract approves through its own
IContractNamersetting.
The ENS developer docs cover this under Reverse Resolution.
The docs list two more routes as upcoming. One is a signature route for contracts. The other is signature-based primary name claiming on L2 networks, such as Base. Both are listed as upcoming.
Common questions
Why does ENS Explorer say "No reverse records yet" for my contract?
ENS Explorer shows "No reverse records yet" on a contract's Reverse Resolution page when the contract has no primary name. Neither ENS app has a control to set one, so use the contract route in this article.
My contract already has a primary name. Does it keep working?
Yes, a contract's existing primary name keeps working at launch, with no action from you. The records behind ETH and Default primary names stay on ENSv1 at launch.
