Redirect www to non-www htaccess

It’s been asked a gazillion times but it’s still not working in my WordPress. I want to redirect everything to https://website.com. Current code been used: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301] </IfModule> based on this one but I also…