Wordpress & trailing slash on domain name
-
Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as
but since moving to wordpress my domain is now having a slash put on the end of it like
Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?
If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)
Thanks
T
-
Takeshi, that was great thank you
-
Try this:
<code># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule (.+)/$ $1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] IfModule></code>
-
Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on
RewriteBase /newsite/ or do I have to strip out a few more?
Don't like messing with my hataccess so any help to point me in the right direction would be great!
# BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /newsite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /newsite/index.php [L]</ifmodule> # END WordPress
-
Good point!
Just checked and www.domain.co.uk redirects to www.domain.co.uk/
This a htaccess issue perhaps?
-
Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?
-
Self hosted!
I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site
-
Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.
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 it OK to shorten your brand name in your title tags
If your title tag is over 55 characters, is it generally OK or good practice to abbreviate your brand name (at the end of the title tag) for the sake of the other keywords in the tag?
On-Page Optimization | | AliMac261 -
One Main Brand Domain - One EMD which Ranks Better
Hello SEO MOZers! We have one one main ecommerce site and I have just discovered we have an EMD sitting on a .co.uk, for one of our premium product ranges, and it actually outranks our main website. It appears on page one. My question is how do I handle the EMD? I don't want to start building authority to this site, as we are currently developing the main brand site, however I can't ignore that it is ranking. There is relatively little content. There are links on the page (it's only one page) that go through to the product section on the main site. But should I 301 redirect it? What would be your advise? I want to capitalise on any traffic we could benefit from, and ultimately I want the main site to rank better for this product's keywords. Any help would much appreciated.
On-Page Optimization | | CarlaAction1 -
Redirect www.domain to domain
How do I redirect www.entrepreneurhandbook.co.uk to entrepreneurhandbook.co.uk The latter is an existing site. Thanks James
On-Page Optimization | | entrepreneurhandbook1 -
How to name images for billingual website ?
I have a website where images are based on a different domain. And i am calling only one single image for english and french version. I m wondering if it s valuable to use both languages in naming the images like Apple-Pomme.jpg or if there might be any drawbacks.Thanks !
On-Page Optimization | | ennick0 -
Making best use of keyword phrase domain url
Hi everyone Our industry has a particular keyword phrase that is very popular. We currently own this as a domain name. How can we make use of this to our main websites advantage?
On-Page Optimization | | LadyApollo0 -
Slash vs no slash?
Why does SeoMoz tell me I have duplicate content issues and show me these two URLs? mysite.com mysite.com/ What does the slash matter and why is that considered duplicate content?
On-Page Optimization | | shawn810 -
SEO Domain Values
I always thought that there was no difference in value between a .com and .net, also that hyphens have the same value as the keyphrase without the hyphen. But I have heard Rand lately saying hyphens are spammy - whats the go? Is CarParts.com better than Car-Parts.com or Car-Parts.net etc?
On-Page Optimization | | Ventura0 -
Optimizing Wordpress Categories
I’m trying to optimize the category links in the wordpress blog http://blog.reputationforward.com. I’m in the process of installing the Yeost SEO plugin and am going to revise the Category Title Tags, Meta Descriptions and slugs. I’m also in the process of using Tags so that I can get the posts that appear in a category to be specific to that category (currently the publisher is listing posts in multiple categories: See “Business Management Category”). But other than that, is there anything else I can do to optimize each category?
On-Page Optimization | | EricVallee341