Redirecting to my page

Hey, so I have CNAME DNS record with a name “” and value of “[]” which should be correct as I am hosting my page on github (and when I write “” it works). But even though I added .htaccess file to redirect anyone that doesnt write “www” to my page it just doesnt work and it says that it couldnt find DNS address of this server. So I wanted to ask where could be the problem or what am I missing or if there is some problem on github?
Thank you for your time,

.htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

.htaccess is for Apache (and possibly other) servers. Such a file is ignored by Netlify. You need to use a _redirects file as outlined in

Also I see is using Netlify DNS. This is intended for sites hosted on Netlify, not on other platforms.

If you want to use a custom domain on a GitHub Pages site, I suggest looking at the custom domains documentation on GitHub Pages