.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
-
Structured markup for wordpress
Hello, I am having problems with marking up my WP posts. I used the All-in-One which seems to be the most user-friendly, except when I denote the aspects of the "article" and update, the markup shows up as a box at the bottom of the post (even though the info is in the text). How do I mark these up for Google without having the unseemly box at the bottom? Thanks so much in advance for any help! Btw, I am not altogether comfortable just yet on manual schematic markup (if you have a really basic manual markup that will let me do so across various platforms, I would also appreciate the recommendation). Thanks!
Technical SEO | | lfrazer1 -
How should we setup of a side (slightly off-topic) blog?
Our web application targets small business owners and entrepreneurs. However, the developers at our company have a lot of great content to offer the web development community and so we want to start a "behind the scenes" blog where we can discuss technical topics... JavaScript performance, web accessibility, etc. Our customers and the visitors of our website would probably not be interested this new content... So we want to be careful not to cannibalize or damage our current SEO. What are some of the major risks we should watch out for? If we put it on a subdomain, is that enough to not impact our main site SEO or introduce keyword confusion? Conversely, are there opportunities for this side blog to help the SEO and authority of our main website/domain? Thanks for the help!
Technical SEO | | Bill4Time0 -
Changing title tag in wordpress media pages
Hello! I have a problem of duplicate title on 59 pages in Worpress. I Guess it happened after a recent WP update, because, suddenly, I got a peak of 59 from zero in a day. The SeoMoz crawl report states that there are 59 duplicate title. As you may see in the picture those are all media pages, whose title is written really badly with the formula postname/filename/blogTitle, ending up with trunkated, too long, title tags, that result in duplicate page title. How can I simply hide these mediapages or sculpting the title tag the way I want? I am using all-in-one-seo WP plugin, which doesn't seem to provide a solution. Thank you all! DoMiSol Rossini SOwZg5C.jpg
Technical SEO | | DoMiSoL0 -
File name same as folder name, ok?
Is it ok to have a folder and file name to be both the same e.g domain.com/xyz-products/ domain.com/xyz-products.php File name would be a page that lists a number of products and then within the folder there would be x-product.php, y-product.php etc
Technical SEO | | NeilD0 -
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 -
Should I add my blog posts to my sitemap.txt file?
This seems like it should be an obvious no, just because of the amount of work that would entail, and then remembering to do it every time I make a post, but since I couldn't find anything on Google about it and have never heard anyone mention it, I figured I'd ask.
Technical SEO | | UnderRugSwept0 -
Blog in subfolder or folder
SEO best practices says that one should put blog in a subfolder. Like www.example,com/blog In the above case, should we say that the blog is in folder or subfolder. Actually, i have been unsure about this folder vs subfolder thing. Some examples of this would be appreciated. What is the example of a blog in a subdomain ? Thanks
Technical SEO | | seoug_20050 -
When to SEO optimize a blog post?
Hi there, Here's our situation: there are two people working on the blog. person 1) writes the posts person 2) SEO optimizes the posts I know this is not ideal but it's the best we can do and it's a whole lot better than no blog. 🙂 I'm the fellow optimizing the posts. I've found that my best SEO efforts usually slightly undermine the readability of these posts -- not in an extreme way, I'm not going overboard with keywords or anything. Rather, things like a sexy & enticing article heading may have to be dummed down for search engines... Because of this dumming down, I like to wait a couple of weeks to SEO optimize our posts, the logic being that we get the best of both worlds: a happy regular readership on topic articles that are clearly described for (and aligned to the terms used by) our search engine visitors What I'm wondering is, Generally: can you see any problems with this setup? would you do it differently? Specifically: does Google (et al) punish this sort of backwards re-writing? and, does it somehow amount to less SEO mojo when done retroactively? Thanks so much for your time! Best, Jon
Technical SEO | | JonAmar0