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
-
Do You Add City Name & Key Word For Every Page?
Hello, I'm new to SEO but feel I have a decent grasp on it. However, I had a question pertaining to key words and using my city name in it. For instance, if I am using the key word "herniated disc treatment" do I need to put in my city name behind it or does google recognize that I am already in my city area because of my geo tagging and having it listed on the footer of my site? Any help would be greatly appreciated. Thanks! -Scott
On-Page Optimization | | slgray0 -
Change SEO focus from homepage to other page on the domain
Hi, we are (were) ranking top 5 with gietvloer-wand.nl by focussing the homepage for a certain keyword. We're trying to change to focus from the homepage to /gietvloeren with more content / information. How to go about this? how to tell Google that /gietvloeren is more relevant / important then than the homepage? Or any experiences how long it will take for Google to see that the page has more information than the homepage? It's a test and any experiences you can share would be great. Thanks!
On-Page Optimization | | Heers0 -
No-index or 301 - custom wordpress archives
Hi, We are using custom wordpresss posts to showcase different services we provide, these are then grouped within custom archives. These custom archive pages are our main keyword landing pages and traffic generators (although ranking is fairly average). It's come to my attention that these custom posts have also been listed in the wordpress standard categories, with an identical title, excerpts and near identical urls as the custom archives. This appears to have been the case for quite a while. We are concerned that this is may causing duplicate content issues and unsure how to proceed. We have been advised to simply no-index the redundant 'standard' categories but as they have been indexed for some time we are cautious of causing any upset with search engines (although the categories are indexed they are not ranking for any major keywords) Are we best 301ing the redundant category to the custom archives or using a canonical tags or simply no-indexing the categories like other archive pages? Any advice is aprreciated Many thanks BC
On-Page Optimization | | benct0 -
Product content length & links within product description
Hello, I have questions regarding content length and links within descriptions. With our ecommerce site, we have thousands of products, each with a unique description. In the product description, I have links to the parent category and grandparent category (if it has one) in the main product text which is generally about 175 words. Then I have a last paragraph that's about 75 words that includes links to our main homepage and our main product catalogue page. Is the content length long enough? I used to use text that was 500 words, and shortening it I still rank when launching new products, so I don't think an increase in text length will have any additional benefit. I do see conflicting information when I do searches, with some people recommending a minimum of 300 words and some saying to try and go a 1000 for category pages. In regards to the links, I noticed a competitor has stopped following this format, so I'm unsure if I should keep going too. Is it too many links to have each of the products link back to the main catalogue and homepage? Is it good to have links with anchor text to the categories a product is in? There are breadcrumbs on the page with these links already. There are already have heaps of links on our pages (footer, and a right sidebar with image links to relevant categories), so my pages do get flagged for too many links. Thanks!
On-Page Optimization | | JustinBSLW0 -
Google Site Search & SEO benefits
Hi all - I've had a comb through the forums here but can't seem to find any updates on whether there any tangible benefits for using Google Site Search. We're currently exploring using Lucene, Oracle Endeca, & Google Site Search - but from what I've read so far there are no quantifiable benefits for choose Google over any others. Everything I've read is rumor-mill...anybody have experience or references? Thanks in advance!
On-Page Optimization | | kenno690 -
How do you treat http/https and slashes at the end of a site?
I believe there is a difference between http://www.abc.com vs https://www.abc.com I also know that it shows security and whatnot, but how do you treat it? Do you submit both? Do you re-direct one to the other? What if you have had the non-secure site for years and the links are mostly crawled? My second question is similar as my report shows these two as different: http://www.abc.com/blog vs http://www.abc.com/blog/ I didn't think it made a difference, but when I submitted the links to Google it would not accept them without the slash at the end. Again, the same questions as above in regards to how to treat it. Do you submit both? Do you re-direct one to the other? What if you have had the non-slash site for years and the links are mostly crawled? -What about http://www.abc.com vs http://abc.com ? They go to the same page, but are they treated the same?
On-Page Optimization | | tiffany11030 -
Post url not matching with post title ( wordpress)
I have this site called searchoflife.com on which I have noticed the post urls are not matching with the post title. For Example:Post Title - A Dialogue With NaturePost URL - http://searchoflife.com/dialogue-nature-2013-09-12 Words like 'A' and 'with' are not present in the post URL. This has been the trend since a few days. After investigating I found out that it was due to my plugin SEO ultimate which is actually creating post slugs automatically for the post urls. So my question is whether it is advisable to use post slugs instead of the full post url. Does it affect the SERPS for my site?
On-Page Optimization | | toxicpls0 -
Wordpress Pages vs. Posts
When building a blog to promote a particular affiliate offer, I usually like to use a static "page" homepage and then have my posts displayed on another part of my site. I've noticed that my wordpress pages almost always rank higher than wordpress posts and I can't explain it... Here are some possibilities I've thought of: XML Sitemap priority is set at 60% for pages and only 20% for posts My main navbar lists the pages which consequently means they get linked to on every page on my website. Some other phenomenon within the wordpress framework... If it helps, I use Thesis v1.8 on all my sites. I guess my ultimate question is: If pages do in fact rank higher than posts, is it worth it for me to go back and change the site structure on all my blogs which are using posts instead of pages. I know making major modifications like that can be disasterous but will it ultimately pay off? Thanks
On-Page Optimization | | drewhammond1