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
-
Duplicated Content on Wordpress Mobile&Desktop versions- Is it bad for SEO?
Hello, I use a Wordpress theme for displaying mobile and desktop versions separately. The problem is that if you use tools like screaming frog or if you look at the code (view source), you can detect duplicated content. But if you're browsing on your mobile you will see only the content I have created for the mobile version and the same if you're looking at the desktop version, you will only see the desktop content.
On-Page Optimization | | AlphaRoadside
Is this creating an SEO problem? If it is, please let me know why and if it has a solution. Thanks in advance.0 -
Custom site to Wordpress transfer
Hi all, Custom site to Wordpress transfer was done a week back. Exact same folder paths and URL's, Analytics/adsense/webmaster etc should be added right? Webmaster where can i get the new code and will all old history be gone from webmaster? Thanks
On-Page Optimization | | klambimut20 -
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 -
Best wordpress theme seo 2014
In your opinion what are the best wordpress theme in 2014 that are responsive, good speed and seo buildup
On-Page Optimization | | maestrosonrisas0 -
Domain authority dropped a lot in last month
I thought I'd asked this earlier but it seems to have disappeared. My client's domain authority has hovered at around 42-46 for the past 6 months. But in the past month it has dropped 6 points. Organic search traffic is up, no keyword rankings have fallen, external links are up slightly, but not massively. Competitors remain roughly the same DA although theirs are only around 14/16 anyway. What should I be looking for as to the cause?
On-Page Optimization | | mfrgolfgti0 -
Wordpress SEo Plug In
Hi, I am researching SEO plug ins for Wordpress - WordpressSEO by Yoast and All-In-One SEO Pack - and I have a question about implementation: In general, what is the impact these plug ins have on blogs with a large archives? Will they make any changes to old posts that may break incoming links or require me to go back and make edits to each of the old posts? Also, the main thing I want to do is allow for custom total tags. Is there another way to get this functionality? Or should I stick with a plug in because of all the other SEO benefits? Thanks
On-Page Optimization | | AmyLB0 -
WordPress - optimizing for new keywords on page or post?
I know WordPress is always a little messy with SEO but i have a main question regarding WordPress optimisation for a special keyword. Let's say i have a chocolade blog and have written about all the vendors of chocolade. Now i found a new keyword which i want to optimize my website for. Should i create a 'Page' within WordPress and optimize it for the new keyword + link to some of the post about a relative keyword within this page?
On-Page Optimization | | Amosnet
OR Should i create a blog post and write about the new keyword and just links some of the other relative blog posts? I hope my question is clear.0 -
Duplicate Title & Content in WordPress
I'm getting a lot of Crawl Errors due to duplicate content and duplicate title because of category and tag posts in WordPress. I rebuilt the sitemap and said to exclude category and tags, should that clear up the issue? I've also went through and did NO INDEX and NO FOLLOW for all categories and posts. Any thoughts on this issue?
On-Page Optimization | | seantgreen0