.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
-
Is there an SEO advantage to blog content being a child of /blog/ rather than the homepage?
I'm working on a website where all the blog content is listed as separate pages from the homepage, eg: www.domain.com/first-blog-post
Technical SEO | | MillyShaw
www.domain.com/second-blog-post However, it would make my life easier if all blog content was listed under /blog/ so that I could analyse it better in Google Analytics. Eg I'd like it to be: www.domain.com/blog/first-blog-post
www.domain.com/blog/second-blog-post The developer is not keen because it would create extra work for him, and he's also said it's a bad idea from an SEO point of view. But is this the case? Presumably with 301s in place it wouldn't make a difference? Thanks for your help!0 -
No H1 tag in wordpress, what are the implications?
When checking my blog posts I noticed that they don't contain any H1 tags. This confused me as I'd heard that wordpress automatically puts H1 tags on your blog post titles. Is this something that might negatively affect my rankings? If an H1 tag is absent, does the H2 tag take center stage so to speak? Is this something my wordpress theme does and how can I fix it? Cheers! Anton
Technical SEO | | antonshakr0 -
What's Worse - 404 errors or a huge .htaccess file
We have changed our site architecture pretty significantly and now have many fewer pages (albeit with more robust content and focused linking). My question is, what should I do about all the 404 errors (keep in mind, I am only finding these in Bing Webmaster tools, not Moz or GWT)? Is it worse to have all those 404 errors (hundreds), or to have a massive htaccess file for pages that are only getting hits by the Bing crawlbot. Any insight would be great. Thanks
Technical SEO | | CleanEdisonInc0 -
Does having mulitste wordpress with same templaes hurt you?
Ok seo guys, don't get crazy here I am not trying to build a link wheel or anything black hat that's why I am asking. I want to create several sites that are within my niche but cannot be on the same site because it just wouldn't make sense. So for the purpose of branding a company can we have multi sites with similar templates or does google not want this. I am not trying to rank these for the sole purpose of back linking but I want them all on a mulit site so they can have the same buddy press network. Let me know what you guys think.
Technical SEO | | JasonRae1 -
E-Commerce site and blogs
We have e-Commerce site and an official blog to give advice about our products. This blog exists under our domain. Usually we build links directly to our site. Recently our ranking started going down. Also, we have been experiencing backlash for spam based on our link building (we are working on this, including a change of staff,but we cannot be sure that this will not happen again). This backlash has come through our social networking outlets (Facebook) in the form of very negative posts to our pages. One of our "SEOs" has devised a plan to use secondary blogs which we would start building links for. This blog would contain links back to our website. The idea is that the blog acts as a gate in a sense, in this way backlash is either posted on the blog or is directed at the blog. Also, we would be attempting to raise the page authority of these secondary blogs so in essence they act as high page authority links back to our website. The concern is that these secondary blogs may undermine the legitimacy of the official primary blog, which is still in its early stages as far as ranking and authority goes. Also, we are concerned that this technique would further undermine the legitimacy of the website itself by creating a larger "spam-like" presence, since visitors may see through the use of the secondary link through blogs.
Technical SEO | | ctam0 -
Problems with changing the page title on Wordpress Site...
The website is http://www.masterpieceinteriors.co.uk/ I'm not sure why the homepage title is reading 'masterpieces' in Google but looks fine here. There seem to be 2 versions of the homepage coming up in google - you can see them both by searching 'masterpieceinteriors' and then 'masterpiece interiors'. Some help would be hugely appreciated!
Technical SEO | | Opiyo0 -
How do I add a blog to a subdirectory of a volusion store?
Based on what I've read so far, the best blog URL for SEO purposes is a subfolder (www.example.com/blog) rather than a subdomain (blog.example.com). I am having a lot of trouble adding a blog to our e-commerce store which is hosted by volusion. I have looked into installing Wordpress into a subdirectory but apparently Volusion does not allow the mysql/myphpadmin/database access needed to successfully do this. I have also looked into trying to publish my blog through ftp using Blogger, but they stopped allowing this a while ago. Does anyone know a way to add a blog to my volusion store's subdirectory? Thanks
Technical SEO | | AHH8880 -
Thesis Vs Yoast Wordpress SEO Plugin
Hi All. I've noticed some issues between the thesis themes and Yoast's plugin, namely, thesis doesn't recognise Yoast's plugin in for title tag and meta description. Is there a way to overide this?
Technical SEO | | PerchDigital0