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
-
Best way to get the fastest WordPress site with existing template
I have a WordPress website that I started building for free and eventually paid the $50 bucks for the premium version. My goal right now is to increase the speed. The current speed rating for the site on Google Insights is 60/100 for mobile and 66/100 for desktop. I have used some plugins to help me increase the speed, but the previous number were the best I could do. How can I get this site at least into the 90/100 range? Should I buy another template, or can I hire someone to go through and optimize it. I would like the best option that is as cost effective as possible as this is a hobby site for me. Thanks!
On-Page Optimization | | FierceFrame1 -
My Site's Name Not Ranking in Google
Hey all, I've seen a few posts like this. But I wanted to start a new thread in hopes I may find the underlying issue. I've had my site: http://www.ctrl-alt-success.com for about 2 years. Recently I've started really adding a lot of content to it. (about 2-3 posts a week). I get zero organic views which is fine as I know it's still in the beginning. But here's my main question. If I type "ctrl-alt-success" into google. I get some site that shows up. "ctrlaltsuccess.com" I've been looking at this issue forever. That site has been "coming soon" for nearly 2 years. lol My site doesn't even show up on the first 10 pages of google. However in Bing and Yahoo it ranks on the first page. What could my site be doing wrong that it's not even ranking for the exact domain name? Keep in mind, if I google "ctrl-alt-success.com" my site comes up fine. Any help would be appreciated, thanks!
On-Page Optimization | | Ctrl-Alt-Success0 -
Wordpress category url problem.
I have set up wordpress categories but the permalinks are showing as www.mydomain.com/?cat=12 as opposed to the category name. The child categories though work fine and show as www.mydomain.com/category/chidcatgegory I've obviously got my permalink settings wrong somewhere. How do I fix this?
On-Page Optimization | | SamCUK0 -
ECommerce & Reviews when generated by 3rd Party uses Javascript
Hi all, I am trying to optimize our product pages and I know one of the important factors is showing customer reviews. While we have plenty of reviews to show they are collected by a third party (Shopper Approved) and the way we have been told to display them on our pages is via a Javascript. My question is, is this sufficient for search engines to be able to crawl and interpret the Javascript or are we missing out on user generated content since it is displayed via Javascript. If so are there best practices or recommendations to help us? Thank you!
On-Page Optimization | | MyFairyTaleBooks
Dinesh
http://www.MyFairyTaleBooks.com <- this is the site in question if it helps.2 -
Changing Link Title Tags & Backlinks
On 4/19/12 I began changing the link title tags in an effort to further optimize my website. I thought they were excessively long and it would be beneficial to make them more concise. On 4/26/12 my website traffic began to fall drastically and I'm not sure if it is from google's penguin update or from changing the link title tags. I started looking into the sudden drop of traffic and realized that when I run the site explorer tool on all of the pages I changed, the URL is redirecting. It appears that the backlinks are not passing through to the new URL. Before I Changed the Link Title Tag: http://www.opensiteexplorer.org/links?site=www.beautystoponline.com%2FAndis-Professional-Hair-Clippers-s%2F102150.htm **After I Changed the Link Title Tag: ** http://www.opensiteexplorer.org/links?site=www.beautystoponline.com%2FAndis-Clippers-s%2F102150.htm So my questions are: The above example shows that the old title tag (www.beautystoponline.com/Andis-Professional-Hair-Clippers-s/102150.htm) has 43 backlinks and the new one (www.beautystoponline.com/Andis-Professiona-Hair-Clippers-s/102150.htm) has 0. Will the links eventually be attributed to the new URL. I understand that the user will still be directed to my website they click the any of the backlinks, but will the link juice pointing the old URL pass through the new one? Would it be better, in the long run, to continue optimizing the link title tags.
On-Page Optimization | | BeautyStop0 -
Duplicate Content for Spanish & English Product
Hi There, Our company provides training courses and I am looking to provide the Spanish version of a course that we already provide in English. As it is an e-commerce site, our landing page for the English version gives the full description of the course and all related details. Once the course is purchased, a flash based course launches within a player window and the student begins the course. For the Spanish version of the course, my target customers are English speaking supervisors purchasing the course for their Spanish speaking workers. So the landing page will still be in English (just like the English version of the course) with the same basic description, with the only content differences on that page being the inclusion of the fact that this course is in Spanish and a few details around that. The majority of the content on these two separate landing pages will be exactly the same, as the description for the overall course is the same, just that it's presented in a different language, so it needs to be 2 separate products. My fear is that Google will read this as duplicate content and I will be penalized for it. Is this a possibility or will Google know why I set it up this way and not penalize me? If that is a possibility, how should I go about doing this correctly? Thanks!
On-Page Optimization | | NiallTom0 -
Redirect sub domain to domain in .htaccessU
Hi all, (Total newbie with fourth post of the last 7 days askin' for help!...sorry!) I've discovered that we have a lot of URLs indexed with for example: http://test.betxpert.com/some-odd-url This gives me duplicate content in the search engines. I have searched the web and i can not find a solution fore redirecting http://test.betxpert.com/some-odd-url to http://www.betxpert.com/some-odd-url. Can anyone help me what to write in the .htaccess file? Best regards, Rasmus
On-Page Optimization | | rasmusbang0 -
Can u suggest me good one page optimization tool for wordpress based websites?
Can u suggest me good one page optimization tool for wordpress based websites?
On-Page Optimization | | dineshameh0