What is Web3Domain?
Web3Domains are domains that live on a public blockchain and give users complete ownership of their stored data. The main benefits to owning one are simplifying crypto transactions by replacing wallet addresses with the domain name and easily creating and hosting websites on web3.
The WordPress plugin “Crypto” can restrict users from accessing certain pages on a website based on the presence of specific Web3Domains in their MetaMask wallet. As a website administrator, you have the option to limit access to your site’s pages only to those users who have a specific Web3Domain in their wallet.
To set up this restriction, you must first have your own TLD or any other TLD that has already been minted. Once you have logged in to your WordPress Admin Dashboard, navigate to the “Crypto” plugin settings by clicking on “Crypto,” then “Settings,” and finally “Access Control.”
In the “Access Control” tab, select the option “Web3Domain Access.” Then, in the sub-tab “Web3Domain Access,” enter the desired TLD of your Web3Domain. After this, select the page you wish to limit access to by using the shortcode [crypto-connect label=”Connect Wallet” class=”fl-button fl-is-info fl-is-light”] [crypto-access-domain].
The function of this page is to check the domains specified in the settings, and if the desired domain is found in the user’s wallet, it will grant them access to the rest of the website.
To restrict access to specific pages or content on your site, you can use the shortcode
[crypto-block] This content is private and only accessible to special users with the required Web3Domain. [/crypto-block]
By using the “Crypto” plugin in this way, you can effectively restrict access to your website’s content to only those users who have a specific Web3Domain in their MetaMask wallet.