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
-
Multiple domains for the same business
My client purchased over 500 URLs for targeting various customers and ranking for different keywords. It is for the same business though. What is the best strategy to deal with this kind of approach in your opinion. They use different meta data for each of the URLs starting with brand name in meta title. Are there any other points to keep in mind when developing strategy for all those URLs. Is this a good approach?
On-Page Optimization | | alicaomisem1 -
H2s & H3s for Category Navigation
Hi all. I am wondering how best to format a category navigation menu. Currently I don't think we're using H2s correctly on our website. Am I right to think that the top level category e.g. Games should be formatted as an H2 and the sub-categories underneath this should be formatted as H3s (to show a hierarchy)? Is there a limit on how many H2s and H3s you should use? Obviously only one H1 per page. Thanks in advance Paul
On-Page Optimization | | kevinliao0 -
Wordpress Title Element tag too long?
So apparently when I add the name of the blog within Wordpress, the name of the blog shows up after the the main title of each blog post and page. So trying to keep the title element >70 characters, how does one name the Wordpress blog as mine is/was: Lake Tahoe wedding photographer / Heidi Huber Photography and keep that only on the intro page and leave each page of the blog and the titles of the blog posts to not have "Lake Tahoe wedding photographer added to the end of the Title Element? Anyone have any idea? I also had gone in at one point and updated every single Title on each page/post using Yoast's SEO and the SEOMOZ crawl is still coming up with over 216 caution errors for the title page. Thank you so much for any advice! Heidi
On-Page Optimization | | hmhuber0 -
Advantages of wordpress over dreamweaver
I have a site that I have built with dreamweaver (local service business not a lot of new content needing to be added) and I am curious how much of an advantage for me converting it to wordpresss would be. I see that cs5 works with wordpress and that lynda.com has a tutorial on integrating the two. I would like to integrate a blog into my site, but it is not totally critical that I do so. I would just like to hear what some of you experienced users have to say about the advantages of wordpress vs dreamweaver from an SEO prospective.
On-Page Optimization | | ayetti0 -
Forcing keywords into domain structure
Hi there, Over the last few years, I've seen people structuring their site so that their main content is all housed in a folder named after the site's primary keywords. For example, if I had some content about home insurance, normally naming conventions state that I might put the content at a URL such as: www.mydomain.com/home-insurance However, some sites, may change this structure to include their main keyword again in the URL string: www.mydomain.com/insurance/home-insurance The folder 'insurance' would normally hold the site's Sitemap to increase internal linking strategy too. I'd be really interested to hear whether anyone has seen any serious benefits from re-structuring their site in this way? What are your thoughts on this? Thanks,
On-Page Optimization | | theshortstack0 -
What is the best out-of-the-box optimized WordPress Theme?
I've reviewed other answers on this forum and searched the web. Still looking for a good answer that's actually specific and can explain why. I've looked at studiopress.com themes, pagelines.com which I love but doesn't appear to have much optimization out of the box, http://themeforest.net/item/udesign-wordpress-theme/253220 http://www.vklabx.com/wordpress-themes/wordpress-theme-ad-flex-niche.php PS - not looking for answers that involve the use of SEO plugins, but if there's a theme you know of that takes minimal editing to improve optimization I'd be interested as well. Thanks in advance, hope this can help someone else as well
On-Page Optimization | | Aqua0 -
Excessive Internal Links & links to same location
Hi, When Google is counting internal links on a page and it comes across two links to the same url, do both of the links count towards Excessive Internal Links? The reason I ask is that on our website we allow users to navigate through the website in different ways (either by dropdown menus or side menu or through breadcrumbs); which cause some links to appear multiple times on the same page. Any thoughts? K.
On-Page Optimization | | soltec0 -
Blog On Domain Or Off?
Hi, Which do you think is more powerful ito SEO rankings for my domain? Should I make the blog part of my domain or should I create a blog on a seperate domain? Zane
On-Page Optimization | | Springboks0