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
-
Does CTR Affect Ranking & Authority? Can PPC Influence That Too?
Hi everyone, Good CTR and bounce rate seem to affect rankings positively, but what about domain authority? Is that something built entirely on links and semantics, or does CTR play a factor too? Consider a homepage ranking for its brand name. Switching off any brand PPC will increase the natural listing's CTR. Would that have a positive SEO impact on the homepage/domain?
On-Page Optimization | | tprg0 -
Re-naming pages without affecting SEO
Due to the management software used for a lot of our websites, the URLs for specific pages appears as: brand.com/page/pagename/number I want to add slug URLs so that they appear as: brand.com/pagename First of all, do you think this is an effective use of my time and will it significantly benefit SEO in the long run. Secondly, these pages have developed a decent PA over time and I don't want to lose that. Will adding 301s for all the renamed pages be enough to not have a negative effect?
On-Page Optimization | | maxweb1 -
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 -
Should Ltd be added to business names in page titles or not?
For example if a page title contained the company name is it advisable to have the page title as: Blue Cups | Company Name Ltd or Blue Cups | Company Name We have a feeling that searchers are not likely add the Ltd whilst performing searches.
On-Page Optimization | | Liveleigh0 -
Photon for Wordpress experience
Has anyone tried switching on the Photon for Wordpress CDN/image caching feature? If so, did you experience any problems and have you noticed any improvements?
On-Page Optimization | | pugh0 -
Blog Post Snippets on HP & Cat Pages
I want my blog's category pages to have the ability to be indexed and rank, therefore I don't want to noindex these pages. My strategy is to create original snippets for each post on these pages but I don't know what Wordpress plugin or configuration I can use to create original snippet content on the Homepage and Category pages that will not show up within the blog post text itself. Any suggestions?
On-Page Optimization | | mj7750 -
I run a Q&A site, should I limit post questions to 64 characters?
I run a Q&A site (Recessionitis.com), should I limit posts (questions) to 64 characters for SEO purposes?
On-Page Optimization | | 10JQKAs0 -
Installing a site on top level domain directory VS deeper directory
How important it is for seo to install a site on a top level directory vs deeper directory? example: www.mysite.com VS www.mysite.com/catalog many eCommerce scripts such as oscommerce and cre loaded will install by default to /catalog and that's what I've been doing for most of my customer. does it mean it will be harder for them to get good seo results? Thanks in advance for the input...
On-Page Optimization | | zigi0