.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
-
Do old website files in the public_html effect SEO?
My client has about a dozen old folders filled with old websites including index files, robots, htaccess files. They are all located in separate files with in public_html. Does this effect them negatively?
Technical SEO | | Renalynd0 -
Wordpress Categories and Over-Optimization Question
I would like to switch my sidebar from listing Category Name with posts listed below each- to a concise custom menu. This custom menu would list the top three products I am promoting first, and then go on to list the categories on my site. Currently it looks like this (but with 6 categories, with between 7-10 items in each - this is on EVERY page) Widgets
Technical SEO | | PrivatePartners
-Green Widget
-Blue Widget Gidwets
-Big Gidwet
-Small Gidwet I rank well in google right now, but I am concerned that changing my sidebar will result in a penalty. Maybe for over-optimizing my top three products I promote, or possibly for trying to control the flow of link juice. Can anyone chime in here who has adjusted their site structure within wordpress, and tell me what you found worked best? ** Before anyone asks**, this structure does work much better for the user. My sidebar now is massive, and is confusing even to me.0 -
Blog is outranking my root domain - Why and Help
I have an odd question concerning SERP rankings on Google along with PageRank and Google Trust. I have a website created in HTML with a WP blog created in a sub-directory. I am finding that the blog is getting relatively good rankings yet it seems the root domain is not getting any of the rank or trust passed onto it as it consistently is outranked by the blog. In fact, for a few of our targeted keywords the root domain does not even show up at all, yet the blog does. Our blog is #2 in Google SERPs, a top Google Place ranking, a Youtube video in the top 10 and a Google Ad place somewhere in the mix of first page ads. The root domain is nowhere to be found. Is there something I need to correct either on the site, in Google Webmaster or in WP Settings that I am not aware that is pushing all the Google Rank and Trust to the blog instead of the other way around? I considered changing the WP Site URL to the root domain thinking it will pass more SEO mojo to the root. But I don't think this is the way to go. I am kind of at a loss, any help is appreciated.
Technical SEO | | SEO-Novice0 -
Creating a Blog of Rodent Removal Companies?
I am helping a small company. Lets say rodent removal is their service. But local SEO for rodent removal is very very competitive in my town and across America. Would a website/blog dedicated to highlighting rodent removers across America be good for my company? We have had nice success with wordpress.com blogs. Supposing I gave 6 other rodent removal companies a free guest post (always 300 words or more) or whatever to post on my blog. Of course, none of these companies would be in my market. Would that help my local SEO? I am thinking long term here?
Technical SEO | | greenhornet770 -
Pointing a sub-domain to a sub-folder in htaccess
I have a client who currently uses shopify for there blog. I want to set them up with a separate blog away from the shopify system and host it in Australia. I know the best option is using a subfolder but as the shopify system is an unmoveable CMS can I somehow point my subdomain to a subfolder and get the benefits of the domain name? I could do this by using the rewrite rule in the htaccess file. If I was to do this would it end up cloaking the URL's of the articles?
Technical SEO | | acs1110 -
Wordpress theme installation problem
Hi, I was trying to install different theme from wordpress - appearance - install theme As soon as I did that, I saw error message and can't even access to my wp-admin Can anyone help me with this problem? My site is http://www.inksellsanpedro.com I tried rename old theme - didn't help delete old theme - didn' help either Any help will be greatly appreciated. Thank you
Technical SEO | | BistosAmerica0 -
Wordpress site, combine Blog without hurting SEO - Need Expert Advice
Hi, I come from the old html days of Frontpage and then moved to Dreamweaver. I first worked with Wordpress at version 2.7 and was not all that impressed, but then recently I worked in the new version and was extremely impressed. So my knowledge of Wordpress is VERY limited and plan to build future sites with it. I need to know the best way to solve an issue for a customer. The client is http://www.nextgenrestoration.com/ Site was built years ago with Frontpage. The popularity of Blogs was hot so someone told them that if they add new content it would be better to use a blog, so they added a blog. So you have the following: www.nextgenrestoration.com (main site) then they installed wordpress in a folder (blog) www.nextgenrestoration.com/blog Original person that built the site quit. New person took over and said the main site needed to changed to Wordpress because they did not have Frontpage and all they knew was Wordpress. Main site was converted to Wordpress. They wanted to keep the original design so they did not use a stock template, they just built it with their design. I guess from looking at the Editor, they manually went in and put the design in to match. Now.. this last month, the person that had changed
Technical SEO | | Force7
the site to Wordpress quit. So I got involved because the new person they hired could not add content to the main website. If you add a page, it does not show up, you have to manually go in the php and add the link to the category. The new person knows how to use Wordpress but she knows nothing about PHP so is lost when it comes to manually adding content to the site. Here was my Thoughts. The main site needs to be rebuilt in a stock template so it automatically creates new pages, blog posts. I have to make sure that if we change the
main website that we could keep all the same links and page names. The girl
that built the site, if you hover over the links that she put it under ‘florida’,
that must be a category. But we would need to keep the same page names. I know
we could do a 301 redirect but this guy cannot lose traffic. He is already down
in hits after the last Panda update. My thought was, rebuild the main site in a stock template so
someone can actually add content easily to the site. Also build a new blog
section so it all matches. (personally the existing design looks old and dated and needs updating) If you look at the site now. The blog looks totally
different and it is not helping if a customer comes to the blog but cannot see
the navigation for the whole site. My thought was to just leave the old blog, it has a LOT of backlinks. But just add a new blog to the main site and all new content goes there. The old blog would stay just make sure we did build in some call to action so it sends them to the main site. Also, we found we cannot create a Blog on the
wordpress we have installed in the main directory. I am guessing because it
wants to name it /blog? I want to be sure we give this client the best advice on what to do without
hurting his existing seo and traffic. As you can tell, I am not qualified to really give the best advice since I am so new to Wordpress. This is a small company that really needs some help. Thanks in advance for your time! Force70 -
Which is best blogging platform from SEO POV?
I am curious to find out what is the blogging platform of choice for enterprize level companies (employees more than 500, revenue more tan 150M). What would be the best solution from SEO point of view? I have used Wordpress in the past for small companies and feel that is the best. We are currently using Telligent. Is anybody using it?
Technical SEO | | Amjath0