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
-
Q&A Page Titles
Hello All! I am currently updating page titles and metadata descriptions for a websites Q&A section and have run in to a problem while updating page titles. Since it is the Q&A section of the website, all of the page titles are around 100 characters and some are up to 200 characters long. Here is an example: Page Title: My child is working below grade level in math. Do I have to purchase the curriculum from the grade below as well? The problem is that this is obviously too long for a SERP to display however I know it is best practice to have matching titles on both the title tag and page title. My question is what hurts SEO value more: the title tag and title of the page not matching or having a very long title displayed on the SERP?
On-Page Optimization | | Myles921 -
2 domain pointing to same website, how to resolve it?
My site customer has 2 domains pointing to the same site. So i have 2 domains with the same content, with problems about content duplication. How can i resolve this situation?
On-Page Optimization | | Maximilian210 -
How Do I Get Rel=Author to Work Via Wordpress SEO by Yoast?
I have read Yoast's tutorial and others on how to get rel=author to work properly on my site (http://injuryattorneyshouston.com). Here are the results I get from the Google Structured Data Testing Tool: "Authorship is working for this webpage." "rel=author markup has successfully established authorship for this webpage." "Publisher markup is verified for this page." All seems well except for this: hatom-feed | hatom-entry: | |
On-Page Optimization | | cbizzle
| Error: At least one field must be set for HatomEntry.Error: Missing required field "entry-title".Error: Missing required field "updated".Error: Missing required hCard "author". |
| Error: At least one field must be set for HatomEntry.Error: Missing required field "entry-title".Error: Missing required field "updated".Error: Missing required hCard "author". | Does anyone know how to fix this?0 -
Wordpress SEO. How to add static content above home page posts.
I think I many have some duplicate content issues as have been adding unque content above posts in categories using the all category SEO. How can I add static content to the posts on the home page though? Any help appreciated!
On-Page Optimization | | SamCUK0 -
I have 90 domains at Godaddy and would like to transfer them to a new registrar - Moniker
Will the the transfer to a new registrar hurt my domains in the SERPs if all contact information for the domain stays the same and DNS stays the same and site hosting remains the same?
On-Page Optimization | | jeff.interactive0 -
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 -
Formatting issues WordPress 3.1.2
The and _formatting tags format the text in the WYSIWYG editor but not in the browser (I've tried in Firefox and Internet Explorer. It doesn't help if I add non depreciate Html _and Is this a theme Issue? Is there a way to fix it? Does anyone know why and are added instead of and ?__
On-Page Optimization | | catherine-2793880 -
Purchased domain
We purchased the existing domain www.LancasterPA.com two years ago to promote local businesses. While individual pages within the site are ranking well, we can't get the home page to rank at all in Google. Would there be anything in the history of the domain that could be standing in the way? Or, what else could we check? Our other regional websites are ranking really well. Thanks.
On-Page Optimization | | GordyH0