Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
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
-
How Removing Zombie pages effect on domain authority?
Hi. Recently I got a project (removing zombie pages here: https://www.alamto.com/ ) As you can see this site has about 20k indexed page on google and it seems I should remove about 6000 useless indexed page. does removing (Noindex) these pages affect on the site metrics? Which metrics would affected? and how? Thanks.
On-Page Optimization | | jafarfahi1 -
How does Google handle read more tags in Wordpress
Hi Everyone I am wondering how Google handles the read more tag in Wordpress. I pasted the link to a blog post on Google and found nothing (domain.com/post#readmore). Then I paste the version without #readmore (domain.com/post) and found that Google indexed the page but with the option to click "read more" to read it. The full blog post is not in their index, just the version asking you to read more. Is this because Google hasn't gotten to it or is Google ignoring it. I am not sure but ideally I rather have the full blog post indexed, not the read more version. I am curious to whether this will cause duplicate content issues. What are your experience with this and is it advisable to use an alternate method for read more. Maybe with a Wordpress plugin. Thanks in advance.
On-Page Optimization | | gaben0 -
[HELP!] File Name and ALT Tags
Hi, please answer my questions: 1. Is it okay to use the same keyword on both file name and alt tags when inserting an image? Example: File Name: buy-lego-online.jpg ALT tag: buy-lego-online Will it trigger Google Panda? Will I be penalized for that? Or the file name and alt tags should be different from each other? Because when inserting an image on Wordpress, the alt tags are always the same as the file name by default. 2. For example, I have 2 images in a page (same topic/niche) and I will put "cheap-lego-for-kids" and "best-lego-for-sale" as alt tags. Considering that I repeat the word "lego", is it considered keyword stuffing? Will I be penalized for that? Thanks in advance!
On-Page Optimization | | bubblymaiko0 -
Post url not matching with post title ( wordpress)
I have this site called searchoflife.com on which I have noticed the post urls are not matching with the post title. For Example:Post Title - A Dialogue With NaturePost URL - http://searchoflife.com/dialogue-nature-2013-09-12 Words like 'A' and 'with' are not present in the post URL. This has been the trend since a few days. After investigating I found out that it was due to my plugin SEO ultimate which is actually creating post slugs automatically for the post urls. So my question is whether it is advisable to use post slugs instead of the full post url. Does it affect the SERPS for my site?
On-Page Optimization | | toxicpls0 -
Disabling archives in wordpress
Hi! Do you think it better to: a) have all archives crawled (date, time, category etc.) even though they create duplicate content,. or; b) disable crawling of all archives? Ideally, I'd like to set up just excerpts in the archives and have a unique intro for each, but I'm having trouble doing this just now so was wondering which is the smarter option in the meantime? Thanks very much!
On-Page Optimization | | LeahHutcheon0 -
Important keywords in product names
Hi! among other we sell motorcycle clothing, which you can buy as a set (both jacket and pants) or single piece. Currently we name the products with the labeling in the beginning, e.g: Motorcycle pants R2000, Motorcycle jacket R2000, Motorcycle kit R2000 Motorcycle pants R4000, Motorcycle jacket R4000, Motorcycle kit R4000 This is causing keyword stuffing and cannibalization in the category pages as all the product names include important keywords. On the other hand it would be beneficial to keep the labeling in the name for search queries for the exact product. What be your recommendations? I tend to take the labeling away.
On-Page Optimization | | RomiSverige0 -
Wordpress: Should I NO INDEX Categories & Archives Pages?
I am new to SEOmoz & trying to work my way through the ca-trillion errors that have been found on my site, but for each one I want to ensure that I am helping rather than harming my site. The tool has (as a "notice") said that my category pages & Archives are NO-INDEX, is this how these pages should be dealt with? In addition, the crawler has also (as a "warning error) discovered that my categories, and Archives do not have a meta description..is this of great importance for non indexed pages of this type? Thanks so much to the SEOmoz forum members, you have so far been of invaluable help to me.
On-Page Optimization | | KMack2 -
Image file name, is it important
If I use the same image all over my site, do I need to change the file name to avoid duplicate? Different alt text will be use on those images
On-Page Optimization | | BigBlaze2050