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
-
Wordpress: Why do the URLs of my posts keep changing to match the posts titles?
I'll try to keep this brief. The URLs of my posts keep snapping back to exactly match their post titles, no matter how often I try to change them. e.g. title: How to Tie Your Shoelaces desired URL: tie-shoelaces BUT actual URL: how-to-tie-your-shoelaces Anyone come across/ resolved this issue before?
On-Page Optimization | | GerardAdlum0 -
Domain Redirection
hi all - question we seem to see people ranking better naturally when they have the seo term in their title. Say we were optimising for "red buses". Our company was called Diamond we are using Diamond.co and have a DA of 32 (Page Title Diamond Red Buses | Bla) Should we buy diamondredbuses.co.uk ? Is it best to continue on our domain and redirect? Or move domains? How much would it affect?
On-Page Optimization | | KellyDSD860 -
Change SEO focus from homepage to other page on the domain
Hi, we are (were) ranking top 5 with gietvloer-wand.nl by focussing the homepage for a certain keyword. We're trying to change to focus from the homepage to /gietvloeren with more content / information. How to go about this? how to tell Google that /gietvloeren is more relevant / important then than the homepage? Or any experiences how long it will take for Google to see that the page has more information than the homepage? It's a test and any experiences you can share would be great. Thanks!
On-Page Optimization | | Heers0 -
Is a mobile domain necessary?
Greetings all, I'm starting to build a mobile version of our website to be ready for April 21st. Question is: is it absolutely necessary to have a mobile domain name or can I just direct users to same domain/folder? in other words: www.mywebsite.com/mobile vs m.mywebsite.com - does this even matter? As always, thank you!
On-Page Optimization | | md30 -
Duplicate blogs across different domains
Hi, I am running a blog for several English speaking websites ( e.g Australia, UK ) and I plan doing SEO for these websites. I want to know if it's a must changing all the blogs for these countries in order to avoid Duplicate Content ?
On-Page Optimization | | kiraftw0 -
Opinions please on Duplicate page titles & too many on-page links warnings.-
Hello folks, I'm a total SEO newbe but totally enjoying
On-Page Optimization | | CSC
using SEOmoz to learn more. We have ecommerce sites and the 1st crawl flags – as appears typical too many on-page links. We display up to 20 products (each with three links!)
and I’m trying to push to have fewer but meeting resistance from colleagues.
We have links duplicated all over the site believing it eases navigation. My question is just how critical is the number of products displayed
and the resulting volume of links to SEO results? Also we currently have collections of products displayed
across several pages which of course have the same page title and this is flagged
as a duplication error. I wonder if product auto-scrolling help as this means only a certain number of products are displayed at one time on one page thus reducing links and the need for duplicate page titles? My superiors are resisting change (perhaps nervous of spoiling
what already works) and I need to know where to direct my persuasive powers! Many thanks in anticipation, Spence0 -
Forcing keywords into domain structure
Hi there, Over the last few years, I've seen people structuring their site so that their main content is all housed in a folder named after the site's primary keywords. For example, if I had some content about home insurance, normally naming conventions state that I might put the content at a URL such as: www.mydomain.com/home-insurance However, some sites, may change this structure to include their main keyword again in the URL string: www.mydomain.com/insurance/home-insurance The folder 'insurance' would normally hold the site's Sitemap to increase internal linking strategy too. I'd be really interested to hear whether anyone has seen any serious benefits from re-structuring their site in this way? What are your thoughts on this? Thanks,
On-Page Optimization | | theshortstack0 -
Redirecting to a keyword-rich domain URL
It's best practice to choose a domain that has keyword in it. But if someone has just launched a website and the domain name does not have keyword, is it better to purchase a new domain name that has a keyword in the name and redirect existing domain to the new domain? Will that help SEO? (This just launched website does not have any traffic or links yet.)
On-Page Optimization | | Amjath0