If you have a hosted website and notes that the website address appears as "www.yourdomain.com", you may want to redirect this address to the version without "www", i.e. "yourdomain.com". In addition to being shorter, this version without "www" can also have a positive impact on your SEO.
Here's how to redirect your URLs from "www" to "no-www":
- Access your .htaccess file:The .htaccess file is a configuration file on your web server that allows you to make changes to your website settings. Access this file using an FTP client or from your hosting dashboard.Information and cases of use of the file.htaccess
- Add the redirect code: Once you are in the .htaccess file, add the following lines of code at the beginning of the file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.
yourdomain.com [NC]RewriteRule.*)$ http://yourdomain.com/$1 [L,R=301]
Make sure you replace "yourdomain.com" with your own domain.
- Save and upload the file: .htaccess Save the .htaccess file and upload it to your web server in the same location where the original file is located.
- Verify redirect: To make sure that the redirect works correctly, type your website address with "www" in your browser. If everything is configured correctly, you should be automatically redirected to the version without "www".
In short, redirecting your URLs from "www" to "no-ww" can be beneficial to your SEO and is easy to do through the .htaccess file. If you have any questions or problems performing this process, please contact technical support for help.
For more information, you can contact us.