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
-
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 -
WordPress Archives
Should archives get a no-follow? Should i optimize content on archive pages for seo purposes such as adding meta descriptions. Thank you
On-Page Optimization | | donsilvernail0 -
Transfer Blog From External Domain
Hi All I am in stages of transferring a blog. We currently have partial manual penalty for unnatural links, and we received sample links of our own blog, which happened to be originally setup on another domain. e.g. example.co.uk and the blogs hosted on exampleblog.co.uk - the only way these were linked were through anchor text in each and every blog - so it's clear why this has been picked up. We are now going to transfer these across to our actual domain. Around 60% of the blogs had no meat, so we have pruned through these. What is the best solution; Redirecting ONLY the good blogs via 301 Redirect and 404 pages with no meat OR Redirecting ONLY the good blogs via 301 Redirect the others to Example.co.uk/Blogs Thanks Tom
On-Page Optimization | | TomPryor830 -
Google showing my content on the serps in a different domain
Hi all, Recently a partner of ours discovered that Google is showing a meta description on the serps for his homepage that is not his but ours. On his site, he sells add-ons for our software, so the name of our software appears many times and as well there are many links pointing to our site. He claims he hasn´t copied this text from us, and I have used some tools to verify this. I don´t understand how Google can get confused and show our text as the meta desctiption on the serps for his homepage. Any idea on why this happened?
On-Page Optimization | | Paessler0 -
How to separate your - keywords - and | Brand name in the Title Tag
I have traditionally used hyphens (-) and vertical bars (|) to separate out keywords/brands in title tags. A client has asked if other characters will work such as tilde (~), apersat (@), forward slash (/) etc. Are there any special characters we should steer clear of?
On-Page Optimization | | Switch_Digital0 -
Wordpress Post as Slideshow - One long page vs many short pages?
We are working on implementing a slideshow format for some of the posts on a website, and it appears that using this format breaks a long post into several shorter pages. That's what we want from a user experience standpoint, but are wondering if there are negative SEO implications from having the content broken up in this way, and whether search engines will view it as one longer page or several very short pages? Here is an example: http://www.forthebestrate.com/10-cheap-ideas-for-summer-fun/ Thanks for the help!
On-Page Optimization | | ILM_Marketing0 -
Wordpress permlinks SEO question
What are SEO advantages or disadvantages of the following - /%postname%/ - adds a trailing / /%postname% - no trailing / /%postname%.html - creates .html URL Thanks
On-Page Optimization | | SamBuck0 -
SEO Plugins for WordPress
Hi, Mozzers- I'm re-evaluating my SEO WordPress Plugins. What are your favorites and why? Are there others that you avoid and why? Thanks!
On-Page Optimization | | lhc672