Block
Block Some Bots using htaccess
A lot of time we get many requests from some bots we do not need here you can block them from htaccess file
<IfModule mod_setenvif.c> SetEnvIfNoCase User-Agent (SemrushBot|Semrush|python-requests|sqlmap|wordpress|apachebench) bad_user_agents Order Allow,Deny Allow from all Deny from env=bad_user_agents </IfModule>
add phtml file to Static Block or CMS Page Magenot2
you have to add this code to the block or to the page
{{block class="Magento\Framework\View\Element\Template" template="{Vendor}_{Module}::pages/example.phtml"}}
Example
{{block class="Magento\Catalog\Block\Product\ListProduct" category_id="50" name="home.products.list.custom" template="Magento_Catalog::product/list.phtml"}}