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
-
titles length, URL length and meta descriptions on a subdomain effecting SEO on main domain?
Hi all, I am currently evaluating areas for optimization on my main domain. When doing this, Moz has identified multiple titles and urls that should be shortened and missing meta descriptions on my subdomain (a help center of sorts). As far as I am aware, we have not set up any "no-index" rules for this subdomain. Are these items affecting SEO on my main domain? Thanks,
On-Page Optimization | | annegretwidmer
Kasey0 -
Ranking & Visibility suddenly Down for my website
Any google updates or, can anyone tell me what google running, web ranking down, majority keywords showing on 1st pages right now those are on 3rd page, so is there any specific reason, or any solutions plz.. this s my website www.iqlance.com can anyone help me to audit and what was the issues facing exactly..
On-Page Optimization | | harry5501 -
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 -
Why are http and https pages showing different domain/page authorities?
My website www.aquatell.com was recently moved to the Shopify platform. We chose to use the http domain, because we didn't want to change too much, too quickly by moving to https. Only our shopping cart is using https protocol. We noticed however, that https versions of our non-cart pages were being indexed, so we created canonical tags to point the https version of a page to the http version. What's got me puzzled though, is when I use open site explorer to look at domain/page authority values, I get different scores for the http vs. https version. And the https version is always better. Example: http://www.aquatell.com DA = 21 and https://www.aquatell.com DA = 27. Can somebody please help me make sense of this? Thanks,
On-Page Optimization | | Aquatell1 -
How To Change Wordpress Category Title
My categories are indexed and I want to change the category page title. At present it just defaults to the category name but I want to set a different page title. For example I want the category to be 'Motor Cars' but I want the category page title to be 'Buy Motor Cars - New And Used'. How can I do this?
On-Page Optimization | | SamCUK0 -
Anyone knows h1, h2, h3..h6 plugin for wordpress?
Can anyone share which is the good plugin of wordpress for header tags?
On-Page Optimization | | surajrathore0 -
Hyphens in Domain Name
I have a client who is a business broker. I have just begun working with them, and they are trying to determine the best domain name to use - they have several. business-broker-alabama.com vs businessbrokeralabama.com Which one of these has more value? I know that search engines have somewhat devalued keywords. The first one probably has a little more SEO value, but is going to be a drag in terms of marketing -- saying "business hyphen broker hyphen alabama" is going to get old for them. Thanks!
On-Page Optimization | | csmithal0 -
Transferring authority from one domain to another
My dilemma For example: If I have a website ranking at number 11 for (Keyword) and there is a site named www.(Keyword).com ranking at number 12 for (Keyword), if I were to buy this site and redirect to my own site, would this be at all beneficial? Any advice would be much appreciated!
On-Page Optimization | | CMoore850