In backend, go to STORES → [Attributes] Product . Click Add New Attribute button.
Complete the Basic Properties
The Basic Properties is required for a product attribute.
Insert the Default Label to describe the attribute.
In theCatalog Input Type for Store Owner choose Yes/No of the input from a list.
Choose Yes for theValue Required to ask customers to select the options before purchasing.
Complete the Advanced Properties (Optional)
Insert theAttribute Code that is less than 30 characters and excluded spaces.
TheScope includes Store View, Website, and Global.You will choose one of three places in your store system where the appearance of attribute is approved.
Apply theUnique Value if you not want to share it with other products.
Insert the Field Label
Open theManage Title section.
Insert theTitle that is shown for the field label. In case of multiple languages supported on your store, insert the translation of the title for each view.
Complete the Storefront Properties
Choose Yes for the Use in Search to be ready for searching the attribute.
Allow comparing the product attributes in Product Compare if you choose Yes in the Comparable on Storefront field.
Choose Yes in the Use for Promo Rule Conditions field to apply the product attribute for the price rules.
To make the attribute visible in catalog page listing, choose Yes in the Visible on Catalog Pages on Storefront field.
If Product Listing is supported at your store, the attribute can be appeared and used as sort parameter. Configuring that from the UUsed in Product Listing and Used for Sorting in Product Listing field.
Save Attribute to finish all.
Reindex Data
Login to your server with your SSH account
Switch to apache user
Change to magento root directory
Run command line: php bin/magento indexer:reindex
Run command line: php bin/magento cache:clean (if your site enable cache).
In backend, go to STORES → [Attributes] Product . Click Add New Attribute button.
Complete the Basic Properties
The Basic Properties is required for a product attribute.
Complete the Advanced Properties (Optional)
Insert the Field Label
Complete the Storefront Properties
Reindex Data