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
-
How do I redirect SEO from pages on old website to new website with new domain name?
How do I redirect SEO from pages on old website to new website with new domain name? My website in squarespace has good rankings and we have rebranded to a new name and enw domain name, how do I move across the rankings fomr the old site in squarespace to my new site thats in wordpress please?
On-Page Optimization | | Carrotpower0 -
Woocommerce ULRs & SEO
My company is in the process of converting from a .net site to a wordpress site using Woocommerce. We are #1 in Google SEO ranking and have spent a lot of time getting to this point. My currents URL is /smithco.com/rotating-widgetsbecause of the way wordpress works - I'm going to have /product/ in the URL in the new siteThew new URL will be/smithco.com/product/rotating-widgetsShould I be worried about this ?thanks in advance
On-Page Optimization | | ThomasErb0 -
Wordpress 503 errors
We've launched a new website and i'm see a lot of 503 errors when i run Screaming Frog Seo Spider. Does anyone know how to solve this problem? wwww.besteluieraanbiedingen.nl Thanks!
On-Page Optimization | | Happy-SEO1 -
Domain authority decreased but rankings increased
Hello! I'm a bit confused. It seems the industry as a whole that my company operates in has taken a bash from the update a few days ago as all of the competitiors have taken a hit to their domain authority. What is confusing is that my websites rankings have increased as well. There has been a change to the robots.txt file in an effort to stop being crawled by SEMRush which is messing with my site stats but that is the only change. Thanks in advance, Ben
On-Page Optimization | | Ben-Cleaver1 -
Client is not ranking on Google For Brand Name Search but is on Yahoo and Bing
We have a mobile app development client that recently 6 months ago changed their domain name to www.FSStudio.com. So they are concerned that they don’t rank on the first page for the brandname phrase “FS Studio” On Google. They do rank on the first page for this phrase in Yahoo or Bing. But why is Google returning search results for stuff like Free Studio? I know this fairly obvious question which the answers may be that they need more authority or backlinks because their name happens to be a fairly competitive search for stuff that is unrelated. Any suggestions? We are going to be optimizing and creating a lot more content. Is this just that they need to mention their name FS Studio more frequently throughout their website? Here is a screenshot from Moz’s Keyword difficulty and SERP Analysis tool. agwlY9i.png
On-Page Optimization | | vabmediaseo0 -
Multiple local addresses for one domain
Hi Mozzers! If I have a website that has a separate office in each state that they wish to rank locally for eg: "service CityA" "service CityB" etc Would it be best to have a separate subdomain for each major city (unique content on each) with the office address specific to that city? Then there would be a separate Google places listing the subdomain as the website. Or should we just use subfolders? Would Google Places accept the subfolder as the web address? thanks!
On-Page Optimization | | Netboost1 -
Advantages of Wordpress Pages versus Posts
I have a number of SEO focused articles that I would like to post to our site to help with content and rankings. I am wondering the advantages of posting the content as a page versus a post within Wordpress. Or even vice versa.
On-Page Optimization | | findachristianjob
Any thoughts on whether I should do as a page or post? Thanks.0 -
Image files names - should each be different ?
Hi SEOs I have created a page on my website with a certain tutorial - let's say "How to change a tyre in your car". I have Grade A from On-page report using SEOmoz tool. I have put a relevant alt description for each photo I have put in that tutorial and I have used relevant keyword as a name for each image. So for example this would look like that: changing-tyre-1.jpg changing-tyre-2.jpg My question is should I name these file differently according to their content ? For example if on my photo there is some tool I have to use to change the tyre should the file have the name relevant to the subject of the article/tutorial on the page or to the content of the image ? Is that a stupid question ? Or am I getting too fussy ? Thanks
On-Page Optimization | | lolskizz0