.htaccess file in wordpress blog
-
I want to redirect non www to www in blog hosted by wordpress. Where can i find .htaccess file ? Shall i have to create a new one ? If yes, where should i upload it ?
Thanks
-
I know these are basics of wordpress. Now, i need to read some articles to enlighten me.
I appreciate your help. Thanks.
-
These are really Wordpress basics Atul
Might be a good idea for you to read some articles on wordpress.org about this.
You can find the wp-config.php file in the root folder of your domain. Where all the wordpress files are located and where all the folders are located like /themes /plugins. That's the root.
Making a .htaccess file isn't hard. It's just a txtfile which has been saved as a .htaccess file without an extension.
Just add the following code, where example.com is your domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L] -
Thanks Yannick.
How do i upload the file to root folder. Where can i find wp-config.php file. A few step by step explanation will be of much help.
-
There isn't one by default. You can create one by uploading it to the root of your directory. So where the wp-config.php file and the rest is located.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
My wordpress website is facing indexing problems
Hello, I am facing indexing issues on one of my which is about budget bushcraft knife, Four months have been passed I built my site and published almost 8 articles so far. But i am worried no single keyword ranked on google till yet as I checked through MOZ site explorer. Can anyone guide me on what should I need to do now? Thanks
Technical SEO | | Ewerurt0 -
Recipe Wordpress Plugin - Structured Data?
We have been using this plugin for years: https://wordpress.org/plugins/ziplist-recipe-plugin/ and it appears that it's causing us serious problems in Google. So we're looking for either a new plugin or possible directions on if we should custom build an option into our site. Ultimately we're looking for the best setup for the Recipes on our site to obtain a Featured Snippet. Thank you!
Technical SEO | | FabulesslyFrugal0 -
Author schema and Wordpress Author Page
Hi everyone, Has anyone tried using the author schema on their Wordpress author page or on their G+ profile or on their Moz profile? Would it be a good idea to always use it where you publish? I publish on several blogs Thanks Carla example: Use it here - http://www.posicionamientowebenbuscadores.com/blog/author/carla/ http://moz.com/community/users/392216 It seems like I would be over doing it.
Technical SEO | | Carla_Dawson0 -
Duplicate content issue with Wordpress tags?
Would Google really discount duplicate content created by Wordpress tags? I find it hard to believe considering tags are on and indexed by default and the vast majority of users would not know to deindex them . . .
Technical SEO | | BlueLinkERP0 -
Htaccess - multiple matches by error
Hi all, I stumbled upon an issue on my site. We have a video section: www.holdnyt.dk/video htaccess rule: RewriteCond %{REQUEST_FILENAME} !-f
Technical SEO | | rasmusbang
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^video index.php?area=video [L,QSA] Problem is that these URLs give the same content:
www.holdnyt.dk/anystring/video
www.holdnyt.dk/whatsoever/video Any one with a take on whats wrong with the htaccess line? -Rasmus0 -
Moving an eCommerce Site to Wordpress
I'm evaluating moving an established eCommerce I own over to a WordPress based site with a woocommerce plugin. My question is, does the added /category/ slug hurt SEO rankings at all?
Technical SEO | | CobraJones950 -
301 redirect on wordpress.com
Hi, How/where do I input a 301 redirect for my http site within wordpress.com. I am already redirecting my wordpress url to myy new non wordpress domain Thanks Lisa
Technical SEO | | lisamarieCunn0 -
Properly Moving Blog from Index to its Own Page
Right now I have a website that is exclusively a blog. I want to create pages outside of the blog and move the blog to a page other than the index file e.g.) from domain.com to domain.com/blog I will have the blog post pages stay in the root directory. e.g.) domain.com/blog-post Any suggestions how to properly tell SE's and other websites that the blog has moved?
Technical SEO | | Bartell0