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
-
Duplicate 'meta title' issue (AMP & NON-AMP Pages)
how to fix duplicate meta title issue in amp and non-amp pages? example.com
On-Page Optimization | | 21centuryweb
example.com/amp We have set the 'meta title' in desktop version & we don't want to change the title for AMP page as we have more than 10K pages on the website. ----As per SEMRUSH Tool---- ABOUT THIS ISSUE It is a bad idea to duplicate your title tag content in your first-level header. If your page’s <title>and <h1> tags match, the latter may appear over-optimized to search engines. Also, using the same content in titles and headers means a lost opportunity to incorporate other relevant keywords for your page.</p> <p><strong>HOW TO FIX IT</strong></p> <p>Try to create different content for your <title> and <h1> tags.<br /><br />this is what they are recommending, for the above issue we have asked our team to create unique meta and post title for desktop version but what about AMP page?<br /><br />Please help!</p></title>0 -
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 -
How to separate your - keywords - and | Brand name in the Title Tag
I have traditionally used hyphens (-) and vertical bars (|) to separate out keywords/brands in title tags. A client has asked if other characters will work such as tilde (~), apersat (@), forward slash (/) etc. Are there any special characters we should steer clear of?
On-Page Optimization | | Switch_Digital0 -
Is .PW domain is good for SEO?
I want to register .PW domain which has recently got live to register. I am in doubt should it is good for SEO or not.
On-Page Optimization | | semmediapvtltd0 -
Changing Link Title Tags & Backlinks
On 4/19/12 I began changing the link title tags in an effort to further optimize my website. I thought they were excessively long and it would be beneficial to make them more concise. On 4/26/12 my website traffic began to fall drastically and I'm not sure if it is from google's penguin update or from changing the link title tags. I started looking into the sudden drop of traffic and realized that when I run the site explorer tool on all of the pages I changed, the URL is redirecting. It appears that the backlinks are not passing through to the new URL. Before I Changed the Link Title Tag: http://www.opensiteexplorer.org/links?site=www.beautystoponline.com%2FAndis-Professional-Hair-Clippers-s%2F102150.htm **After I Changed the Link Title Tag: ** http://www.opensiteexplorer.org/links?site=www.beautystoponline.com%2FAndis-Clippers-s%2F102150.htm So my questions are: The above example shows that the old title tag (www.beautystoponline.com/Andis-Professional-Hair-Clippers-s/102150.htm) has 43 backlinks and the new one (www.beautystoponline.com/Andis-Professiona-Hair-Clippers-s/102150.htm) has 0. Will the links eventually be attributed to the new URL. I understand that the user will still be directed to my website they click the any of the backlinks, but will the link juice pointing the old URL pass through the new one? Would it be better, in the long run, to continue optimizing the link title tags.
On-Page Optimization | | BeautyStop0 -
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 -
Change in Product Name
My site - http://www.guru99.com/quick-test-professional-qtp-tutorial.html Currently caters to an automation testing product from HP called Quick Test Professional popularly know and searched as QTP Recently HP changed the product name from QTP to HP Functional Test. Considering this , what do I do with exiting QTP pages and how do I optimize the site moving ahead...
On-Page Optimization | | krishrun0 -
301 redirect (www.domain.com/index to www.domain.com)
Hello, Please let me know what are the exact right steps in order to get rid of the duplicate content issues related with: www.domain.com/index.html same as www.domain.com without creating an infinite loop. Do you have a step by step guide posted within seomoz including 301 redirect for non www to www for all urls and index.whatever to main domain name without going into a infinite loop ? btw how to you spot the loop ? is it obvious like never ending refresh of the home page ? thanks a lot !
On-Page Optimization | | eyepaq2